aboutsummaryrefslogtreecommitdiff
path: root/swaylock
diff options
context:
space:
mode:
Diffstat (limited to 'swaylock')
-rw-r--r--swaylock/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index 591df7b4..f31ed679 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -42,6 +42,7 @@ static void daemonize() {
int devnull = open("/dev/null", O_RDWR);
dup2(STDOUT_FILENO, devnull);
dup2(STDERR_FILENO, devnull);
+ close(devnull);
uint8_t success = 0;
if (chdir("/") != 0) {
write(fds[1], &success, 1);