swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 40a3700a99902e984c73450326057a3c6d9833d7
parent d39de9284485a276b204fc588b91a50fbb19a7f4
Author: Michael Forney <mforney@mforney.org>
Date:   Mon, 24 Oct 2016 02:03:29 -0700

launch: posix_spawn* functions return positive error number

Diffstat:
Mlaunch/launch.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/launch/launch.c b/launch/launch.c @@ -495,19 +495,19 @@ main(int argc, char *argv[]) sprintf(buf, "%d", sock[1]); setenv(SWC_LAUNCH_SOCKET_ENV, buf, 1); - if (posix_spawnattr_setflags(&attr, POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK) < 0) + if (posix_spawnattr_setflags(&attr, POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK) != 0) die("failed to set spawnattr flags:"); sigemptyset(&set); - if (posix_spawnattr_setsigmask(&attr, &set) < 0) + if (posix_spawnattr_setsigmask(&attr, &set) != 0) die("failed to set spawnattr sigmask:"); sigaddset(&set, SIGCHLD); sigaddset(&set, SIGUSR1); sigaddset(&set, SIGUSR2); sigaddset(&set, SIGINT); sigaddset(&set, SIGTERM); - if (posix_spawnattr_setsigdefault(&attr, &set) < 0) + if (posix_spawnattr_setsigdefault(&attr, &set) != 0) die("failed to set spawnattr sigdefault:"); - if (posix_spawnp(&child_pid, argv[optind], NULL, &attr, argv + optind, environ) < 0) + if (posix_spawnp(&child_pid, argv[optind], NULL, &attr, argv + optind, environ) != 0) die("failed to spawn server:"); run(sock[0]);