diff options
author | Leah Neukirchen <leah@vuxu.org> | 2024-02-07 14:59:34 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2024-02-07 14:59:34 +0100 |
commit | 90e0de5f150e27573096036b3ec253128d821ae3 (patch) | |
tree | d332e1b2dd1216b5773eb129037bbaa9c7b2485e | |
parent | 4646c0e8a83c00dd8e11c6bb0f30b1fbd32782ea (diff) | |
download | nitro-90e0de5f150e27573096036b3ec253128d821ae3.tar.gz nitro-90e0de5f150e27573096036b3ec253128d821ae3.tar.xz nitro-90e0de5f150e27573096036b3ec253128d821ae3.zip |
fail when control socket already exists
We don't wanna remove the control socket for a running nitro instance, this serves as an easy check to not have two running at the same time.
-rw-r--r-- | nitro.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/nitro.c b/nitro.c index 14587c9..74c769c 100644 --- a/nitro.c +++ b/nitro.c @@ -1002,12 +1002,11 @@ open_control_socket() { fatal("socket"); fcntl(controlsock, F_SETFD, FD_CLOEXEC); - unlink(path); mode_t mask = umask(0077); int r = bind(controlsock, (struct sockaddr *)&addr, sizeof addr); umask(mask); if (r < 0) - fatal("bind; errno=%d\n", errno); + fatal("could not bind control socket: errno=%d\n", errno); } void |