From 5a6aeddfa7262e41802c77f70c9ef88e9c2c2476 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 26 May 2007 16:44:20 +0000 Subject: xpipe: introduce (saves ~170 bytes) udhcp/signalpipe.c: use pipe instead of socketpair. --- runit/runsv.c | 5 ++--- runit/runsvdir.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'runit') diff --git a/runit/runsv.c b/runit/runsv.c index bd4a81eee..d5bfd4e89 100644 --- a/runit/runsv.c +++ b/runit/runsv.c @@ -420,7 +420,7 @@ int runsv_main(int argc, char **argv) if (!argv[1] || argv[2]) usage(); dir = argv[1]; - if (pipe(selfpipe) == -1) fatal_cannot("create selfpipe"); + xpipe(selfpipe); coe(selfpipe[0]); coe(selfpipe[1]); ndelay_on(selfpipe[0]); @@ -456,8 +456,7 @@ int runsv_main(int argc, char **argv) taia_now(&svd[1].start); if (stat("log/down", &s) != -1) svd[1].want = W_DOWN; - if (pipe(logpipe) == -1) - fatal_cannot("create log pipe"); + xpipe(logpipe); coe(logpipe[0]); coe(logpipe[1]); } diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 39929fc49..4b94aa211 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c @@ -184,7 +184,7 @@ static int setup_log(void) warnx("log must have at least seven characters"); return 0; } - if (pipe(logpipe) == -1) { + if (pipe(logpipe)) { warnx("cannot create pipe for log"); return -1; } -- cgit v1.2.3