aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fcgi.c4
-rw-r--r--ge.c14
-rw-r--r--parse.y4
-rw-r--r--sandbox.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/fcgi.c b/fcgi.c
index 553211e..bf3cae0 100644
--- a/fcgi.c
+++ b/fcgi.c
@@ -244,14 +244,14 @@ fcgi_read(struct bufferevent *bev, void *d)
struct sockaddr_un addr;
if ((debug_socket = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
- err(1, "socket");
+ fatal("socket");
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
strlcpy(addr.sun_path, "./debug.sock", sizeof(addr.sun_path));
if (connect(debug_socket, (struct sockaddr*)&addr, sizeof(addr))
== -1)
- err(1, "connect");
+ fatal("connect");
}
#endif
diff --git a/ge.c b/ge.c
index e310714..d43f446 100644
--- a/ge.c
+++ b/ge.c
@@ -56,9 +56,9 @@ load_local_cert(struct vhost *h, const char *hostname, const char *dir)
char *cert, *key;
if (asprintf(&cert, "%s/%s.cert.pem", dir, hostname) == -1)
- errx(1, "asprintf");
+ fatal("asprintf");
if (asprintf(&key, "%s/%s.key.pem", dir, hostname) == -1)
- errx(1, "asprintf");
+ fatal("asprintf");
if (access(cert, R_OK) == -1 || access(key, R_OK) == -1)
gen_certificate(hostname, cert, key);
@@ -102,12 +102,12 @@ data_dir(void)
if ((xdg = getenv("XDG_DATA_HOME")) == NULL) {
if ((home = getenv("HOME")) == NULL)
- errx(1, "XDG_DATA_HOME and HOME both empty");
+ fatalx("XDG_DATA_HOME and HOME both empty");
if (asprintf(&t, "%s/.local/share/gmid", home) == -1)
- err(1, "asprintf");
+ fatalx("asprintf");
} else {
if (asprintf(&t, "%s/gmid", xdg) == -1)
- err(1, "asprintf");
+ fatal("asprintf");
}
mkdirs(t, 0755);
@@ -120,11 +120,11 @@ logger_init(void)
int p[2];
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, p) == -1)
- err(1, "socketpair");
+ fatal("socketpair");
switch (fork()) {
case -1:
- err(1, "fork");
+ fatal("fork");
case 0:
close(p[0]);
setproctitle("logger");
diff --git a/parse.y b/parse.y
index 534c7b6..db4329e 100644
--- a/parse.y
+++ b/parse.y
@@ -675,7 +675,7 @@ lungetc(int c)
if (file->ungetpos >= file->ungetsize) {
void *p = reallocarray(file->ungetbuf, file->ungetsize, 2);
if (p == NULL)
- err(1, "lungetc");
+ fatal("lungetc");
file->ungetbuf = p;
file->ungetsize *= 2;
}
@@ -809,7 +809,7 @@ top:
}
yylval.v.string = strdup(buf);
if (yylval.v.string == NULL)
- err(1, "yylex: strdup");
+ fatal("yylex: strdup");
return STRING;
}
diff --git a/sandbox.c b/sandbox.c
index d0d05b1..3216c98 100644
--- a/sandbox.c
+++ b/sandbox.c
@@ -47,7 +47,7 @@ void
sandbox_logger_process(void)
{
if (pledge("stdio recvfd", NULL) == -1)
- err(1, "pledge");
+ fatal("pledge");
}
#else