README in systemu-1.1.0 vs README in systemu-1.2.0
- old
+ new
@@ -1,22 +1,32 @@
NAME
- systemu.rb
+ systemu
SYNOPSIS
univeral capture of stdout and stderr and handling of child process pid for windows, *nix, etc.
URIS
http://rubyforge.org/projects/codeforpeople/
http://codeforpeople.com/lib/ruby/
+ http://codeforpeople.rubyforge.org/svn/
INSTALL
gem install systemu
+HISTORY
+
+ 1.2.0
+
+ - fixed handling of background thread management - needed
+ Thread.current.abort_on_exception = true
+
+ - fixed reporting of child pid, it was reported as the parent's pid before
+
SAMPLES
<========< samples/a.rb >========>
~ > cat samples/a.rb
@@ -33,11 +43,11 @@
status, stdout, stderr = systemu date
p [ status, stdout, stderr ]
~ > ruby samples/a.rb
- [#<Process::Status: pid=9960,exited(0)>, "Fri Nov 03 17:22:23 MST 2006\n", "Fri Nov 03 17:22:23 MST 2006\n"]
+ [#<Process::Status: pid=987,exited(0)>, "Thu Dec 06 16:01:59 -0700 2007\n", "Thu Dec 06 16:01:59 -0700 2007\n"]
<========< samples/b.rb >========>
~ > cat samples/b.rb
@@ -55,11 +65,11 @@
status = systemu date, 'stdout' => stdout, 'stderr' => stderr
p [ status, stdout, stderr ]
~ > ruby samples/b.rb
- [#<Process::Status: pid=9965,exited(0)>, "Fri Nov 03 17:22:23 MST 2006\n", "Fri Nov 03 17:22:23 MST 2006\n"]
+ [#<Process::Status: pid=992,exited(0)>, "Thu Dec 06 16:01:59 -0700 2007\n", "Thu Dec 06 16:01:59 -0700 2007\n"]
<========< samples/c.rb >========>
~ > cat samples/c.rb
@@ -96,11 +106,11 @@
puts stderr
~ > ruby samples/d.rb
- /tmp
+ /private/tmp
<========< samples/e.rb >========>
~ > cat samples/e.rb
@@ -138,12 +148,13 @@
systemu looper do |cid|
sleep 3
Process.kill 9, cid
end
- p [ status, stdout, stderr ]
-
+ p status
+ p stderr
~ > ruby samples/f.rb
- [#<Process::Status: pid=9985,signaled(SIGKILL=9)>, "", "1162599744\n1162599745\n1162599746\n1162599747\n"]
+ #<Process::Status: pid=1012,signaled(SIGKILL=9)>
+ "1196982119\n1196982120\n1196982121\n"