[BACK]Return to proc.h CVS log [TXT][DIR] Up to [local] / ircnowd / src / ngircd

Annotation of ircnowd/src/ngircd/proc.h, Revision 1.1.1.1

1.1       tomglok     1: /*
                      2:  * ngIRCd -- The Next Generation IRC Daemon
                      3:  * Copyright (c)2001-2011 Alexander Barton (alex@barton.de) and Contributors.
                      4:  *
                      5:  * This program is free software; you can redistribute it and/or modify
                      6:  * it under the terms of the GNU General Public License as published by
                      7:  * the Free Software Foundation; either version 2 of the License, or
                      8:  * (at your option) any later version.
                      9:  * Please read the file COPYING, README and AUTHORS for more information.
                     10:  */
                     11:
                     12: #ifndef __proc_h__
                     13: #define __proc_h__
                     14:
                     15: /**
                     16:  * @file
                     17:  * Process management (header)
                     18:  */
                     19:
                     20: /** Process status. This struct must not be accessed directly! */
                     21: typedef struct _Proc_Stat {
                     22:        pid_t pid;      /**< PID of the child process or 0 if none */
                     23:        int pipe_fd;    /**< Pipe file descriptor or -1 if none */
                     24: } PROC_STAT;
                     25:
                     26: /** Return true if sub-process is still running */
                     27: #define Proc_InProgress(x)     ((x)->pid != 0)
                     28:
                     29: /** Return file descriptor of pipe to sub-process (or -1 if none open) */
                     30: #define Proc_GetPipeFd(x)      ((x)->pipe_fd)
                     31:
                     32: GLOBAL void Proc_InitStruct PARAMS((PROC_STAT *proc));
                     33:
                     34: GLOBAL pid_t Proc_Fork PARAMS((PROC_STAT *proc, int *pipefds,
                     35:                               void (*cbfunc)(int, short), int timeout));
                     36:
                     37: GLOBAL void Proc_GenericSignalHandler PARAMS((int Signal));
                     38:
                     39: GLOBAL size_t Proc_Read PARAMS((PROC_STAT *proc, void *buffer, size_t buflen));
                     40:
                     41: GLOBAL void Proc_Close PARAMS((PROC_STAT *proc));
                     42:
                     43:
                     44: #endif
                     45:
                     46: /* -eof- */

CVSweb