[Xorp-cvs] XORP cvs commit: xorp/libxorp

Pavlin Radoslavov pavlin@icir.org
Sat, 14 Jan 2006 00:57:48 GMT


CVSROOT:	/usr/local/share/doc/apache/cvs
Module name:	xorp
Changes by:	pavlin@xorpc.icir.org	2006-01-14 00:57:48 UTC

XORP CVS repository


Modified files:
	libxorp       popen.cc popen.hh run_command.cc run_command.hh 

Log message:
	* Refactor the implementation of the RunCommand facility:
	  - Add a mechanism to intercept SIGCHLD signals (on UNIX only),
	    and consider the command is exited not only after EOF is
	    received on stdout/stderr but after SIGCHLD is received as
	    well. We need this to support third-party external programs
	    that close stdout/stderr on startup.
	  - Export API to get the exit/termination status of the program
	  - Add support to terminate a command with prejudice (i.e., SIGKILL).
	  - Add support to dispatch a callback if the command is stopped
	    by a signal (e.g., by SIGSTOP).
	  - Misc. cleanup.
	
	* Add "bool dont_wait" as a second argument to popen2() to indicate
	  whether wait4() should be called.
	
	* If popen2() fails, don't print the error message; the caller
	  should print the error as it finds it appropriate.
	  For the time being popen2() doesn't return any error messages,
	  though in the future this may change.

Revision  Changes                                 Path
1.13      +17 -6;  commitid: d3c143c849e27ea6;    xorp/libxorp/popen.cc
1.5       +2 -2;  commitid: d3c143c849e27ea6;     xorp/libxorp/popen.hh
1.19      +307 -88;  commitid: d3c143c849e27ea6;  xorp/libxorp/run_command.cc
1.11      +156 -10;  commitid: d3c143c849e27ea6;  xorp/libxorp/run_command.hh