00001 #ifndef H_RPMSQ
00002 #define H_RPMSQ
00003
00009 #include <rpmsw.h>
00010
00013 typedef struct rpmsig_s * rpmsig;
00014
00017 typedef struct rpmsqElem * rpmsq;
00018
00025 typedef void (*rpmsqAction_t) (int signum, void * info, void * context)
00026 ;
00027
00028
00029
00030 extern int _rpmsq_debug;
00031
00032
00033 #if defined(_RPMSQ_INTERNAL)
00034
00037 struct rpmsqElem {
00038 struct rpmsqElem * q_forw;
00039 struct rpmsqElem * q_back;
00040 pid_t child;
00041 volatile pid_t reaped;
00042 volatile int status;
00043 struct rpmop_s op;
00044 rpmtime_t ms_scriptlets;
00045 int reaper;
00046 int pipes[2];
00047
00048 void * id;
00049 };
00050 #endif
00051
00052
00053
00054 extern rpmsq rpmsqQueue;
00055
00056
00057
00058 extern sigset_t rpmsqCaught;
00059
00060 #ifdef __cplusplus
00061 extern "C" {
00062 #endif
00063
00070
00071 int rpmsqInsert( void * elem, void * prev)
00072
00073 ;
00074
00075
00081
00082 int rpmsqRemove( void * elem)
00083
00084 ;
00085
00086
00093
00094 void rpmsqAction(int signum, void * info, void * context)
00095
00096
00097 ;
00098
00099
00106 int rpmsqEnable(int signum, rpmsqAction_t handler)
00107
00108 ;
00109
00115 pid_t rpmsqFork(rpmsq sq)
00116
00117 ;
00118
00124 pid_t rpmsqWait(rpmsq sq)
00125
00126 ;
00127
00134 void * rpmsqThread(void * (*start) (void * arg), void * arg)
00135
00136 ;
00137
00143 int rpmsqJoin( void * thread)
00144
00145 ;
00146
00152 int rpmsqThreadEqual( void * thread)
00153
00154 ;
00155
00159 int rpmsqExecve (const char ** argv)
00160
00161 ;
00162
00163 #ifdef __cplusplus
00164 }
00165 #endif
00166
00167 #endif