summaryrefslogtreecommitdiffstats
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 0ca8d12163..7a59e7c759 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -815,7 +815,7 @@ int udev_event_spawn(
return log_device_error_errno(event->dev, r,
"Failed to fork() to execute command '%s': %m", cmd);
if (r == 0) {
- if (rearrange_stdio(-1, TAKE_FD(outpipe[WRITE_END]), TAKE_FD(errpipe[WRITE_END])) < 0)
+ if (rearrange_stdio(-EBADF, TAKE_FD(outpipe[WRITE_END]), TAKE_FD(errpipe[WRITE_END])) < 0)
_exit(EXIT_FAILURE);
(void) close_all_fds(NULL, 0);