quark

quark web server
git clone git://git.suckless.org/quark
Log | Files | Refs | LICENSE

commit 0fed1d5bd2ccec145f54a8a759e5866e8894bc78
parent 820f644fe379d57e8163cf7b8b1577de43f032bc
Author: Quentin Rameau <quinq@fifth.space>
Date:   Mon, 24 Jul 2017 00:31:01 +0200

Use die() instead of fprintf+exit

Diffstat:
quark.c | 9+++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/quark.c b/quark.c @@ -1023,9 +1023,7 @@ main(int argc, char *argv[]) /* raise the process limit */ rlim.rlim_cur = rlim.rlim_max = maxnprocs; if (setrlimit(RLIMIT_NPROC, &rlim) < 0) { - fprintf(stderr, "%s: setrlimit RLIMIT_NPROC: %s\n", argv0, - strerror(errno)); - return 1; + die("%s: setrlimit RLIMIT_NPROC: %s\n", argv0, strerror(errno)); } /* validate user and group */ @@ -1049,9 +1047,8 @@ main(int argc, char *argv[]) case 0: /* reap children automatically */ if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) { - fprintf(stderr, "%s: signal: Failed to set SIG_IGN on" - "SIGCHLD\n", argv0); - return 1; + die("%s: signal: Failed to set SIG_IGN on SIGCHLD\n", + argv0); } /* chroot */