.TH "PipeStreamSignalHandling" 3 "Mon Jan 12 2015" "Version dvi2bitmap1.0" "dvi2bitmap" \" -*- nroff -*- .ad l .nh .SH NAME PipeStreamSignalHandling \- .PP Takes care of the signal handling necessary for the functions in the \fBPipeStream\fP class\&. .SH SYNOPSIS .br .PP .SS "Classes" .in +1c .ti -1c .RI "struct \fBprocess_status\fP" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "bool \fBgot_status\fP (pid_t pid, int *status)" .br .RI "\fIChecks to see if the given process has exited\&. \fP" .ti -1c .RI "void \fBexpectAnother\fP () throw (InputByteStreamError)" .br .RI "\fINote that we expect to start another child\&. \fP" .ti -1c .RI "void \fBchildcatcher\fP (int)" .br .ti -1c .RI "void \fBalarmcatcher\fP (int)" .br .in -1c .SS "Variables" .in +1c .ti -1c .RI "struct \fBprocess_status\fP * \fBprocs\fP = 0" .br .ti -1c .RI "sig_atomic_t \fBnprocs\fP" .br .ti -1c .RI "sig_atomic_t \fBnprocs_used\fP" .br .in -1c .SH "Detailed Description" .PP Takes care of the signal handling necessary for the functions in the \fBPipeStream\fP class\&. If your application for whatever reason has to catch \fCSIGCHLD\fP, then to avoid interference between these, you should do so using functions \fBexpectAnother\fP and \fBgot_status\fP\&. These two functions are the only `public' API in this namespace\&. .SH "Function Documentation" .PP .SS "void PipeStreamSignalHandling::alarmcatcher (intsignum)" .PP Referenced by expectAnother()\&. .SS "void PipeStreamSignalHandling::childcatcher (intsignum)" .PP References nprocs, nprocs_used, PipeStreamSignalHandling::process_status::pid, procs, and PipeStreamSignalHandling::process_status::status\&. .PP Referenced by expectAnother()\&. .SS "void PipeStreamSignalHandling::expectAnother ()\fBInputByteStreamError\fP" .PP Note that we expect to start another child\&. This function must be called before doing each \fCfork()\fP, as it does the initialisation of the structures used by this set of functions, and subsequently ensures that there is enough space in the list of statuses to hold another one\&. .PP \fBExceptions:\fP .RS 4 \fI\fBInputByteStreamError\fP\fP if we can't do this for some reason .RE .PP .PP References alarmcatcher(), childcatcher(), InputByteStream::getVerbosity(), normal, nprocs, nprocs_used, and procs\&. .PP Referenced by PipeStream::PipeStream()\&. .SS "bool PipeStreamSignalHandling::got_status (pid_tpid, int *status)" .PP Checks to see if the given process has exited\&. If there's an entry for this PID in the list, then put the corresponding status in the \fCstatus\fP parameter, and return true\&. If not, return false; \fC*status\fP is then unchanged\&. .PP \fBParameters:\fP .RS 4 \fIpid\fP the PID to check .br \fIstatus\fP a pointer to the status to be returned .RE .PP \fBReturns:\fP .RS 4 true if the status was in fact available, and is now in \fC*status\fP; false otherwise .RE .PP .PP References PipeStreamSignalHandling::process_status::clear(), InputByteStream::getVerbosity(), normal, nprocs, nprocs_used, procs, and PipeStreamSignalHandling::process_status::status\&. .PP Referenced by PipeStream::close()\&. .SH "Variable Documentation" .PP .SS "sig_atomic_t PipeStreamSignalHandling::nprocs" .PP Referenced by childcatcher(), expectAnother(), and got_status()\&. .SS "sig_atomic_t PipeStreamSignalHandling::nprocs_used" .PP Referenced by childcatcher(), expectAnother(), and got_status()\&. .SS "struct \fBprocess_status\fP* PipeStreamSignalHandling::procs = 0" .PP Referenced by childcatcher(), expectAnother(), and got_status()\&. .SH "Author" .PP Generated automatically by Doxygen for dvi2bitmap from the source code\&.