[hackers] [quark] Use die() instead of fprintf+exit || Quentin Rameau

From: <git_AT_suckless.org>
Date: Mon, 24 Jul 2017 16:49:36 +0200 (CEST)

commit 0fed1d5bd2ccec145f54a8a759e5866e8894bc78
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Mon Jul 24 00:31:01 2017 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Mon Jul 24 16:49:24 2017 +0200

    Use die() instead of fprintf+exit

diff --git a/quark.c b/quark.c
index 69bb5b1..4e8c4ef 100644
--- a/quark.c
+++ b/quark.c
_AT_@ -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 */
_AT_@ -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 */
Received on Mon Jul 24 2017 - 16:49:36 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 24 2017 - 17:02:43 CEST