Sha256: 97443b6672450e24ced2d6889c25a6f36c08d8db7b498e543567601b1d689ce7
Contents?: true
Size: 380 Bytes
Versions: 12
Compression:
Stored size: 380 Bytes
Contents
#!/dmsp/reference/bin/ruby STDOUT.sync = true $VERBOSE=nil require 'posixlock' q = ARGV.shift || 'q' begin open("#{ q }/lock",'r+') do |f| puts 'locking...' #f.lockf File::F_LOCK, 0 (locked=f.lockf(File::F_TLOCK, 0)) until locked system "touch -B 3600 q/lock" puts 'locked <enter> to unlock...' STDIN.gets end puts 'un-locked' rescue => e p e end
Version data entries
12 entries across 12 versions & 2 rubygems