Skip to content

Instantly share code, notes, and snippets.

@jmdeldin
Created October 21, 2012 08:09
Show Gist options
  • Select an option

  • Save jmdeldin/3926281 to your computer and use it in GitHub Desktop.

Select an option

Save jmdeldin/3926281 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
# Clears all IPC queues.
#
# Author: Jon-Michael Deldin <dev@jmdeldin.com>
#
# different position of the queue id on Linux
`ipcs -q`.scan(/^q (\d+)/) do |m|
puts "removing #{m.first}"
`ipcrm -q #{m.first}`
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment