X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fproc.h;h=4a80edfcce70b3cb261827c28f3290384f337bee;hp=bb4bceb2083c6cb55e4c754c752b225c821d9b48;hb=33fae67579eeab31d7f96f9e53f0529f584b0b1f;hpb=03628dbeaf40a9de34b3eb6d5bf6dd34eed8248c diff --git a/src/ngircd/proc.h b/src/ngircd/proc.h index bb4bceb2..4a80edfc 100644 --- a/src/ngircd/proc.h +++ b/src/ngircd/proc.h @@ -1,6 +1,6 @@ /* * ngIRCd -- The Next Generation IRC Daemon - * Copyright (c)2001-2010 Alexander Barton (alex@barton.de) + * Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,11 +19,14 @@ /** Process status. This struct must not be accessed directly! */ typedef struct _Proc_Stat { - pid_t pid; /* PID of the child process or 0 if none */ - int pipe_fd; /* Pipe file descriptor or -1 if none */ + pid_t pid; /**< PID of the child process or 0 if none */ + int pipe_fd; /**< Pipe file descriptor or -1 if none */ } PROC_STAT; +/** Return true if sub-process is still running */ #define Proc_InProgress(x) ((x)->pid != 0) + +/** Return file descriptor of pipe to sub-process (or -1 if none open) */ #define Proc_GetPipeFd(x) ((x)->pipe_fd) GLOBAL void Proc_InitStruct PARAMS((PROC_STAT *proc)); @@ -35,6 +38,9 @@ GLOBAL void Proc_GenericSignalHandler PARAMS((int Signal)); GLOBAL size_t Proc_Read PARAMS((PROC_STAT *proc, void *buffer, size_t buflen)); +GLOBAL void Proc_Close PARAMS((PROC_STAT *proc)); + + #endif /* -eof- */