Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tweaking pid store

  • Loading branch information...
commit ef3d9af659646774c0928f6ff76bc166de50e838 1 parent 700368d
@jmervine authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/locked-forker.rb
View
7 lib/locked-forker.rb
@@ -22,6 +22,9 @@ def self.run
# start fork
fork do
begin
+ # write pid to lock file
+ self.pid = Process.pid
+
# redirect to log
FileUtils.touch log_file or raise "couldn't create log file (#{self.log_file})"
$stdout.reopen( log_file, "w" )
@@ -41,10 +44,6 @@ def self.run
end
end
- # write pid to lock file
- p = Process.pid
- self.pid = p
-
# say good by
Process.detach pid
end
Please sign in to comment.
Something went wrong with that request. Please try again.