diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-07 17:06:54 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-07 17:06:54 +0000 |
commit | 70007175d28cf4c7323e772683bbe084e62df024 (patch) | |
tree | c0a8c35a1d35689d21cad90c03c77de01df7b15d /polyp/polyplib-context.h | |
parent | 93c8fe6577b59176ed6a54a1ae98f8749f122dc8 (diff) |
implemented new CLI command: dump
add prefork() and postfork() arguments to pa_context_connect_spawn()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@184 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/polyplib-context.h')
-rw-r--r-- | polyp/polyplib-context.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/polyp/polyplib-context.h b/polyp/polyplib-context.h index 65befbb3..4b199751 100644 --- a/polyp/polyplib-context.h +++ b/polyp/polyplib-context.h @@ -82,10 +82,16 @@ int pa_context_connect(struct pa_context *c, const char *server); /** Connect the context to a server. If the default server is local * but not accessible, spawn a new daemon. If atfork is not NULL it is * run after the fork() in the child process. It may be used to close - * file descriptors or to do any other cleanups. Make sure that - * SIGCHLD is handled when calling this function. The function will - * waitpid() on the daemon's PID. \since 0.4 */ -int pa_context_connect_spawn(struct pa_context *c, void (*atfork)(void)); + * file descriptors or to do any other cleanups. (It is not safe to + * close all file descriptors unconditionally, since a UNIX socket is + * passed to the new process.) if prefork is not NULL it is run just + * before forking in the parent process. Use this to block SIGCHLD + * handling if required. If postfork is not NULL it is run just after + * forking in the parent process. Use this to unblock SIGCHLD if + * required. The function will waitpid() on the daemon's PID, but + * will not block or ignore SIGCHLD signals, since this cannot be done + * in a thread compatible way. \since 0.4 */ +int pa_context_connect_spawn(struct pa_context *c, void (*atfork)(void), void (*prefork)(void), void (*postfork)(void)); /** Terminate the context connection immediately */ void pa_context_disconnect(struct pa_context *c); |