diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-01-27 18:21:45 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-01-27 18:21:45 +0100 |
commit | 37989eb47e1ce58eb42bcc50b2abc2dd962ef076 (patch) | |
tree | 591f7af3240465964c88ff6069ddf3a8013a3a29 | |
parent | a463eea144b9fceb44280cd3484f59f593aae5b6 (diff) | |
download | rvnit-37989eb47e1ce58eb42bcc50b2abc2dd962ef076.tar.gz rvnit-37989eb47e1ce58eb42bcc50b2abc2dd962ef076.tar.xz rvnit-37989eb47e1ce58eb42bcc50b2abc2dd962ef076.zip |
prefix perror with rvnit:
-rw-r--r-- | rvnit.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/rvnit.c b/rvnit.c index f7b35de..9afd3f7 100644 --- a/rvnit.c +++ b/rvnit.c @@ -220,7 +220,7 @@ socket_loop(void* ignored) strncpy(addr.sun_path, path, sizeof addr.sun_path - 1); int listenfd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (listenfd < 0) { - perror("socket"); + perror("rvnit: socket"); exit(111); } unlink(path); @@ -228,13 +228,13 @@ socket_loop(void* ignored) int r = bind(listenfd, (struct sockaddr *)&addr, sizeof addr); umask(mask); if (r < 0) { - perror("bind"); + perror("rvnit: bind"); exit(111); } r = listen(listenfd, SOMAXCONN); if (r < 0) { - perror("listen"); + perror("rvnit: listen"); exit(111); } @@ -367,7 +367,7 @@ logger_loop(void* ignored) int n = poll(fds, nfds, -1); if (n < 0) { - perror("poll"); + perror("rvnit: poll"); sleep(1); continue; } @@ -399,7 +399,7 @@ logger_loop(void* ignored) char buf[4096]; ssize_t rd = read(fds[j].fd, buf, sizeof buf); if (rd < 0) { - perror("read"); + perror("rvnit: read"); continue; } @@ -666,7 +666,7 @@ main(int argc, char *argv[]) dir = argv[1]; if (chdir(dir) < 0) { - perror("chdir"); + perror("rvnit: chdir"); return 111; } @@ -702,7 +702,7 @@ main(int argc, char *argv[]) } if (pthread_mutex_init(&services_lock, 0) != 0) { - perror("pthread_mutex_init"); + perror("rvnit: pthread_mutex_init"); return 111; } |