#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.
|
Definition at line 13 of file rpmsq.h. Referenced by rpmsqAction(), and rpmsqEnable(). |
|
Definition at line 17 of file rpmsq.h. Referenced by rpmsqAction(), rpmsqExecve(), rpmsqFork(), rpmsqInsert(), rpmsqRemove(), rpmsqWait(), and rpmsqWaitUnregister(). |
|
Default signal handler prototype.
|
|
Default signal handler.
Definition at line 280 of file rpmsq.c. References rpmsqElem::child, rpmsqElem::cond, errno, rpmsqElem::q_forw, rpmsqElem::reaped, rpmsig, rpmsq, rpmsqCaught, rpmsqQueue, rpmsig_s::signum, and rpmsqElem::status. |
|
Enable or disable a signal handler.
Definition at line 325 of file rpmsq.c. References ADD_REF, DO_LOCK, DO_UNLOCK, rpmsqElem::id, ME, rpmsig, rpmsqCaught, rpmsqQueue, and SUB_REF. Referenced by openDatabase(), rpmdbClose(), rpmsqExecve(), rpmsqFork(), rpmsqWaitUnregister(), and sigchld_cancel(). |
|
Execute a command, returning its status.
Definition at line 596 of file rpmsq.c. References ADD_REF, alloca(), argv, CLEANUP_HANDLER, CLEANUP_RESET, DO_LOCK, DO_UNLOCK, environ, errno, INIT_LOCK, rpmsigTbl_sigchld, rpmsigTbl_sigint, rpmsigTbl_sigquit, rpmsq, rpmsqEnable(), sigchld_cancel(), and SUB_REF. |
|
Fork a child process.
Definition at line 380 of file rpmsq.c. References rpmsqElem::child, ME, rpmsqElem::pipes, rpmsqElem::reaper, rpmsq, rpmsqEnable(), and rpmsqInsert(). Referenced by runScript(). |
|
Insert node into from queue.
Definition at line 189 of file rpmsq.c. References rpmsqElem::child, rpmsqElem::cond, rpmsqElem::id, ME, rpmsqElem::mutex, rpmsqElem::pipes, rpmsqElem::reaped, rpmsqElem::reaper, rpmsq, rpmsqQueue, and rpmsqElem::status. Referenced by rpmsqFork(). |
|
Wait for thread to terminate.
Definition at line 552 of file rpmsq.c. Referenced by fsmNext(), and rpmpsmNext(). |
|
Remove node from queue.
Definition at line 219 of file rpmsq.c. References rpmsqElem::child, rpmsqElem::cond, rpmsqElem::id, ME, rpmsqElem::mutex, rpmsqElem::pipes, rpmsqElem::reaped, rpmsqElem::reaper, rpmsq, and rpmsqElem::status. Referenced by rpmsqWaitUnregister(). |
|
Call a function in a thread.
Definition at line 543 of file rpmsq.c. Referenced by fsmNext(), and rpmpsmNext(). |
|
Compare thread with current thread.
|
|
Wait for child process to be reaped.
Definition at line 511 of file rpmsq.c. References rpmsqElem::child, ME, rpmsqElem::reaped, rpmsqElem::reaper, rpmsq, rpmsqWaitUnregister(), and rpmsqElem::status. Referenced by psmWait(). |
|
|
|
Definition at line 254 of file rpmsq.c. Referenced by rpmdbCheckSignals(), rpmsqAction(), and rpmsqEnable(). |
|
Definition at line 186 of file rpmsq.c. Referenced by rpmsqAction(), rpmsqEnable(), and rpmsqInsert(). |