summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/pid.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-07-14 22:42:01 +0000
committerLennart Poettering <lennart@poettering.net>2006-07-14 22:42:01 +0000
commit860be2e70b33ff5eeb9130f80c4b1c096a2a8f27 (patch)
treea3193083ecdb5055a4536c22ea394c8243731571 /src/pulsecore/pid.c
parent350a253dc559956b63ced4e602b1040ccba66f98 (diff)
try to use send(,,MSG_NOSIGNAL) instead of write() wherever possible (which
will allow us to drop the SIGPIPE check). Cache the results of the last write()/send() to make sure that we do not issue more than necessary system calls. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1083 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/pid.c')
-rw-r--r--src/pulsecore/pid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/pid.c b/src/pulsecore/pid.c
index b8972866..0ad76a6e 100644
--- a/src/pulsecore/pid.c
+++ b/src/pulsecore/pid.c
@@ -56,7 +56,7 @@ static pid_t read_pid(const char *fn, int fd) {
assert(fn && fd >= 0);
- if ((r = pa_loop_read(fd, t, sizeof(t)-1)) < 0) {
+ if ((r = pa_loop_read(fd, t, sizeof(t)-1, NULL)) < 0) {
pa_log_warn(__FILE__": WARNING: failed to read PID file '%s': %s",
fn, pa_cstrerror(errno));
return (pid_t) -1;
@@ -177,7 +177,7 @@ int pa_pid_file_create(void) {
snprintf(t, sizeof(t), "%lu\n", (unsigned long) getpid());
l = strlen(t);
- if (pa_loop_write(fd, t, l) != (ssize_t) l) {
+ if (pa_loop_write(fd, t, l, NULL) != (ssize_t) l) {
pa_log(__FILE__": failed to write PID file.");
goto fail;
}