Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

change SIGINFO to SIGURG

  • Loading branch information...
commit d4bc228aca323b58fea92dbde20c1f8ec36e5386 1 parent 6c54cd8
@jakedouglas jakedouglas authored
View
4 bin/memprof
@@ -120,11 +120,11 @@ class MemprofUploader
def signal_process(pid)
begin
- Process.kill("INFO", pid)
+ Process.kill("URG", pid)
rescue Errno::ESRCH
fail_with("No such process #{pid}!")
end
- puts "Signaled process #{pid} with SIGINFO"
+ puts "Signaled process #{pid} with SIGURG"
end
end
View
2  lib/memprof/signal.rb
@@ -5,7 +5,7 @@
end
Memprof.start
-old_handler = trap('INFO'){
+old_handler = trap('URG'){
pid = Process.pid
fork{
GC.start
View
2  spec/memprof_uploader_spec.rb
@@ -49,7 +49,7 @@
# create a fake file
filename = "/tmp/memprof-#{Process.pid}-#{Time.now.to_i}.json.IN_PROGRESS"
# simulate dump in progress
- trap("INFO") { File.open(filename, "w") {|f| f.write("foo") }; sleep 1 }
+ trap("URG") { File.open(filename, "w") {|f| f.write("foo") }; sleep 1 }
# should get signaled somewhere in here and execute the handler before exiting.
sleep 5
# rename the file to simulate completion of the dump writeout.
Please sign in to comment.
Something went wrong with that request. Please try again.