changeset 12075:762999a046e9 release-3-2-x

syscalls.cc: Recommend waitpid() in popen2() documentation. * * * fix typo in last patch
author Rob Mahurin <rob@utk.edu>
date Wed, 26 Aug 2009 08:17:08 +0200
parents e7c3e9ad2286
children 279d2f4102d7
files src/ChangeLog src/syscalls.cc
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,6 +2,10 @@
 
 	* data.cc (Ffmod): Reverse order of args.
 
+2009-08-26  Rob Mahurin  <rob@utk.edu>
+
+	* syscalls.cc: Recommend waitpid() in popen2() documentation.
+	
 2009-08-25  John W. Eaton  <jwe@octave.org>
 
 	* graphics.cc (gnuplot_backend::send_quit): Wait for gnuplot process.
--- a/src/syscalls.cc
+++ b/src/syscalls.cc
@@ -252,11 +252,16 @@
   endif\n\
 until (done)\n\
 fclose (out);\n\
-     @print{} are\n\
-     @print{} some\n\
+waitpid (pid);\n\
+     @print{} these\n\
      @print{} strings\n\
-     @print{} these\n\
+     @print{} some\n\
+     @print{} are\n\
 @end example\n\
+\n\
+Note that @code{popen2}, unlike @code{popen}, will not \"reap\" the\n\
+child process.  If you don't use @code{waitpid} to check the child's\n\
+exit status, it will linger until Octave exits.\n\
 @end deftypefn")
 {
   octave_value_list retval;