#include <rpmsw.h>Go to the source code of this file.
Data Structures | |
| struct | rpmsqElem | 
| SIGCHLD queue element.  More... | |
Typedefs | |
| typedef rpmsig_s * | rpmsig | 
| typedef rpmsqElem * | rpmsq | 
| typedef void(*) | rpmsqAction_t (int signum, void *info, void *context) | 
| Default signal handler prototype.   | |
Functions | |
| int | rpmsqInsert (void *elem, void *prev) | 
| Insert node into from queue.   | |
| int | rpmsqRemove (void *elem) | 
| Remove node from queue.   | |
| void | rpmsqAction (int signum, void *info, void *context) | 
| Default signal handler.   | |
| int | rpmsqEnable (int signum, rpmsqAction_t handler) | 
| Enable or disable a signal handler.   | |
| pid_t | rpmsqFork (rpmsq sq) | 
| Fork a child process.   | |
| pid_t | rpmsqWait (rpmsq sq) | 
| Wait for child process to be reaped.   | |
| void * | rpmsqThread (void *(*start)(void *arg), void *arg) | 
| Call a function in a thread.   | |
| int | rpmsqJoin (void *thread) | 
| Wait for thread to terminate.   | |
| int | rpmsqThreadEqual (void *thread) | 
| Compare thread with current thread.   | |
| int | rpmsqExecve (const char **argv) | 
| Execute a command, returning its status.   | |
Variables | |
| int | _rpmsq_debug | 
| rpmsq | rpmsqQueue | 
| sigset_t | rpmsqCaught | 
Definition in file rpmsq.h.
| typedef void(*) rpmsqAction_t(int signum, void *info, void *context) | 
| void rpmsqAction | ( | int | signum, | |
| void * | info, | |||
| void * | context | |||
| ) | 
Default signal handler.
| signum | signal number | |
| info | (siginfo_t) signal info | |
| context | signal context | 
Definition at line 292 of file rpmsq.c.
References errno, rpmsqElem::q_forw, rpmsqQueue, save, and rpmsig_s::signum.
Referenced by rpmsqEnable().
| int rpmsqEnable | ( | int | signum, | |
| rpmsqAction_t | handler | |||
| ) | 
Enable or disable a signal handler.
| signum | signal to enable (or disable if negative) | |
| handler | sa_sigaction handler (or NULL to use rpmsqHandler()) | 
Definition at line 346 of file rpmsq.c.
References ADD_REF, DO_LOCK, rpmsqElem::id, ME, rpmsqAction(), rpmsqQueue, and SUB_REF.
Referenced by openDatabase(), rpmdbClose(), rpmsqExecve(), rpmsqFork(), rpmsqWaitUnregister(), and sigchld_cancel().
| int rpmsqExecve | ( | const char ** | argv | ) | 
Execute a command, returning its status.
Definition at line 636 of file rpmsq.c.
References ADD_REF, alloca(), CLEANUP_HANDLER, CLEANUP_RESET, DO_LOCK, DO_UNLOCK, environ, errno, INIT_LOCK, rpmsigTbl_sigchld, rpmsigTbl_sigint, rpmsigTbl_sigquit, rpmsqEnable(), sigchld_cancel(), and SUB_REF.
| pid_t rpmsqFork | ( | rpmsq | sq | ) | 
Fork a child process.
| sq | scriptlet queue element | 
Definition at line 401 of file rpmsq.c.
References rpmsqElem::child, ME, rpmsqElem::mutex, rpmsqElem::pipes, rpmsqElem::reaper, rpmsqEnable(), and rpmsqInsert().
Referenced by runScript().
| int rpmsqInsert | ( | void * | elem, | |
| void * | prev | |||
| ) | 
Insert node into from queue.
| elem | node to link | |
| prev | previous node from queue | 
Definition at line 199 of file rpmsq.c.
References rpmsqElem::child, rpmsqElem::id, ME, rpmsqElem::mutex, rpmsqElem::pipes, rpmsqElem::reaped, rpmsqElem::reaper, rpmsqQueue, and rpmsqElem::status.
Referenced by rpmsqFork().
| int rpmsqJoin | ( | void * | thread | ) | 
Wait for thread to terminate.
| thread | thread | 
Definition at line 592 of file rpmsq.c.
Referenced by fsmNext(), and rpmpsmNext().
| int rpmsqRemove | ( | void * | elem | ) | 
Remove node from queue.
| elem | node to link | 
Definition at line 228 of file rpmsq.c.
References rpmsqElem::child, rpmsqElem::id, ME, rpmsqElem::mutex, rpmsqElem::pipes, rpmsqElem::reaped, rpmsqElem::reaper, and rpmsqElem::status.
Referenced by rpmsqWaitUnregister().
| void* rpmsqThread | ( | void *(*)(void *arg) | start, | |
| void * | arg | |||
| ) | 
Call a function in a thread.
| start | function | |
| arg | function argument | 
Definition at line 583 of file rpmsq.c.
Referenced by fsmNext(), and rpmpsmNext().
| int rpmsqThreadEqual | ( | void * | thread | ) | 
| pid_t rpmsqWait | ( | rpmsq | sq | ) | 
Wait for child process to be reaped.
| sq | scriptlet queue element | 
Definition at line 551 of file rpmsq.c.
References rpmsqElem::child, ME, rpmsqElem::reaped, rpmsqElem::reaper, rpmsqWaitUnregister(), and rpmsqElem::status.
Referenced by psmWait().
| int _rpmsq_debug | 
| sigset_t rpmsqCaught | 
Definition at line 266 of file rpmsq.c.
Referenced by rpmdbCheckSignals(), rpmdbCheckTerminate(), and signalsCaught().
Definition at line 196 of file rpmsq.c.
Referenced by rpmsqAction(), rpmsqEnable(), and rpmsqInsert().
 1.5.2