aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
authorLaine Stump <laine@redhat.com>2023-02-15 03:24:37 -0500
committerStefano Brivio <sbrivio@redhat.com>2023-02-16 17:32:27 +0100
commitc9af6f92db9f760e0b03a75bf688439e4aeab231 (patch)
tree88807dd9f5aa5b0379d792ac1ec1fc15bf1f4eb3 /passt.c
parenta1ab1ca2eedbc16139cf03df06c6012b22f1f2cb (diff)
downloadpasst-c9af6f92db9f760e0b03a75bf688439e4aeab231.tar
passt-c9af6f92db9f760e0b03a75bf688439e4aeab231.tar.gz
passt-c9af6f92db9f760e0b03a75bf688439e4aeab231.tar.bz2
passt-c9af6f92db9f760e0b03a75bf688439e4aeab231.tar.lz
passt-c9af6f92db9f760e0b03a75bf688439e4aeab231.tar.xz
passt-c9af6f92db9f760e0b03a75bf688439e4aeab231.tar.zst
passt-c9af6f92db9f760e0b03a75bf688439e4aeab231.zip
convert all remaining err() followed by exit() to die()
This actually leaves us with 0 uses of err(), but someone could want to use it in the future, so we may as well leave it around. Signed-off-by: Laine Stump <laine@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.c')
-rw-r--r--passt.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/passt.c b/passt.c
index c48c2d5..5b8146e 100644
--- a/passt.c
+++ b/passt.c
@@ -202,10 +202,8 @@ int main(int argc, char **argv)
name = basename(argv0);
if (strstr(name, "pasta")) {
sa.sa_handler = pasta_child_handler;
- if (sigaction(SIGCHLD, &sa, NULL) || signal(SIGPIPE, SIG_IGN)) {
- err("Couldn't install signal handlers");
- exit(EXIT_FAILURE);
- }
+ if (sigaction(SIGCHLD, &sa, NULL) || signal(SIGPIPE, SIG_IGN))
+ die("Couldn't install signal handlers");
c.mode = MODE_PASTA;
log_name = "pasta";
@@ -284,10 +282,8 @@ int main(int argc, char **argv)
}
}
- if (isolate_prefork(&c)) {
- err("Failed to sandbox process, exiting\n");
- exit(EXIT_FAILURE);
- }
+ if (isolate_prefork(&c))
+ die("Failed to sandbox process, exiting");
/* Once the log mask is not LOG_EMERG, we will no longer
* log to stderr if there was a log file specified.