summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/shutdown/s6-linux-init-shutdownd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shutdown/s6-linux-init-shutdownd.c b/src/shutdown/s6-linux-init-shutdownd.c
index e448b92..eea6da7 100644
--- a/src/shutdown/s6-linux-init-shutdownd.c
+++ b/src/shutdown/s6-linux-init-shutdownd.c
@@ -147,7 +147,7 @@ static inline void handle_fifo (buffer *b, char *what, tain *deadline, unsigned
static void restore_console (void)
{
fd_close(1) ;
- if (open("/dev/console", O_WRONLY) != 1)
+ if (open("/dev/console", O_WRONLY) != 1 && open("/dev/null", O_WRONLY) != 1)
strerr_warnwu1sys("open /dev/console for writing") ;
else if (fd_copy(2, 1) < 0)
strerr_warnwu1sys("fd_copy") ;