Commit Diff


commit - bc525c73db98605f5bb8d53fb640b9955997fb48
commit + 2dd5994ae172ed8162aff397b907e4fc476fbaae
blob - 553211ee691c6c4941dfc564240b9d7a6362b253
blob + bf3cae0f550c74887b455a5befa0fdeb4c821dd6
--- fcgi.c
+++ 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
 
blob - e310714ea7937c13c5255facecd139157fd0adf5
blob + d43f44685d0b814ec2a34ef98ae5301f2a27f3bf
--- ge.c
+++ ge.c
@@ -56,9 +56,9 @@ load_local_cert(struct vhost *h, const char *hostname,
 	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");
blob - 534c7b6ee45333534558ec9e9e0a389544bccf5c
blob + db4329e6860dd41950624f18ab357beb09946543
--- parse.y
+++ 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;
 	}
 
blob - d0d05b1dfd036d3fcbed464ed83a602baa48dba1
blob + 3216c980a949452ccd4d973ec5b84ebee2dc6373
--- sandbox.c
+++ sandbox.c
@@ -47,7 +47,7 @@ void
 sandbox_logger_process(void)
 {
 	if (pledge("stdio recvfd", NULL) == -1)
-		err(1, "pledge");
+		fatal("pledge");
 }
 
 #else