aboutsummaryrefslogtreecommitdiff
path: root/slock.c
diff options
context:
space:
mode:
Diffstat (limited to 'slock.c')
-rw-r--r--slock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/slock.c b/slock.c
index edd4440..6f63d3d 100644
--- a/slock.c
+++ b/slock.c
@@ -405,7 +405,8 @@ main(int argc, char **argv) {
case -1:
die("slock: fork failed: %s\n", strerror(errno));
case 0:
- freopen("/dev/null", "w", stdout);
+ if (!freopen("/dev/null", "w", stdout))
+ die("slock: freopen: %s\n", strerror(errno));
break;
default:
if (opt_pid)