Tcl Source Code

Artifact [92887c01e3]
Login

Artifact 92887c01e34daf02e61577f757001ff03c0797d1:

Attachment "21917x.diff" to ticket [412609ffff] added by andreas_kupries 2001-03-31 06:11:25.
? doc/Signal.3
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.390
diff -u -r1.390 ChangeLog
--- ChangeLog	2001/03/30 00:56:28	1.390
+++ ChangeLog	2001/03/30 23:00:28
@@ -1,3 +1,12 @@
+2001-03-30  Andreas Kupries  <[email protected]>
+
+	* unix/mkLinks: Added 'Signal.3', 'Tcl_WaitPid'.
+
+	* doc/DetachPids.3: Added description of 'Tcl_WaitPid' [Bug #219173].
+
+	* doc/Signal.3: New man page describing the public API procedures
+	  'Tcl_SignalId' and 'Tcl_SignalMsg' [Bug #219172].
+
 2001-03-29  Mo DeJong  <[email protected]>
 
 	* tests/interp.test: Print out warning when
Index: doc/DetachPids.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/DetachPids.3,v
retrieving revision 1.2
diff -u -r1.2 DetachPids.3
--- doc/DetachPids.3	1998/09/14 18:39:48	1.2
+++ doc/DetachPids.3	2001/03/30 23:00:28
@@ -11,7 +11,7 @@
 .TH Tcl_DetachPids 3 "" Tcl "Tcl Library Procedures"
 .BS
 .SH NAME
-Tcl_DetachPids, Tcl_ReapDetachedProcs \- manage child processes in background
+Tcl_DetachPids, Tcl_ReapDetachedProcs, Tcl_WaitPid \- manage child processes in background
 .SH SYNOPSIS
 .nf
 \fB#include <tcl.h>\fR
@@ -19,14 +19,23 @@
 \fBTcl_DetachPids\fR(\fInumPids, pidPtr\fR)
 .sp
 \fBTcl_ReapDetachedProcs\fR()
+.sp
+Tcl_Pid
+\fBTcl_WaitPid\fR(\fIpid, statPtr, options\fR)
 .SH ARGUMENTS
 .AS int *statusPtr
 .AP int numPids in
 Number of process ids contained in the array pointed to by \fIpidPtr\fR.
 .AP int *pidPtr in
 Address of array containing \fInumPids\fR process ids.
+.AP Tcl_Pid pid in
+The id of the process (pipe) to wait for.
+.AP int* statPtr out
+The result of waiting on a process (pipe). Either 0 or ECHILD.
+.AP int options
+The options controlling the wait. WNOHANG specifies not to wait when
+checking the process.
 .BE
-
 .SH DESCRIPTION
 .PP
 \fBTcl_DetachPids\fR and \fBTcl_ReapDetachedProcs\fR provide a
@@ -57,6 +66,12 @@
 \fBexec\fR command may never get executed, you may wish to call
 \fBTcl_ReapDetachedProcs\fR from time to time so that background
 processes can be cleaned up.
+.PP
+\fBTcl_WaitPid\fR is a thin wrapper around the facilities provided by
+the operating system to wait on the end of a spawned process and to
+check a wether spawned process is still running. It is used by
+\fBTcl_ReapDetachedProcs\fR and the channel system to portably access
+the operating system.
 
 .SH KEYWORDS
 background, child, detach, process, wait
Index: unix/mkLinks
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/mkLinks,v
retrieving revision 1.18
diff -u -r1.18 mkLinks
--- unix/mkLinks	2001/01/18 19:09:56	1.18
+++ unix/mkLinks	2001/03/30 23:00:34
@@ -309,8 +309,10 @@
 if test -r DetachPids.3; then
     rm -f Tcl_DetachPids.3
     rm -f Tcl_ReapDetachedProcs.3
+    rm -f Tcl_WaitPid.3
     ln DetachPids.3 Tcl_DetachPids.3
     ln DetachPids.3 Tcl_ReapDetachedProcs.3
+    ln DetachPids.3 Tcl_WaitPid.3
 fi
 if test -r DoOneEvent.3; then
     rm -f Tcl_DoOneEvent.3
@@ -757,6 +759,12 @@
     ln SetErrno.3 Tcl_GetErrno.3
     ln SetErrno.3 Tcl_ErrnoId.3
     ln SetErrno.3 Tcl_ErrnoMsg.3
+fi
+if test -r Signal.3; then
+    rm -f Tcl_SignalId.3
+    rm -f Tcl_SignalMsg.3
+    ln Signal.3 Tcl_SignalId.3
+    ln Signal.3 Tcl_SignalMsg.3
 fi
 if test -r SetRecLmt.3; then
     rm -f Tcl_SetRecursionLimit.3