sysvinit/killproc-2.18-open_flags.dif

12 lines
476 B
Plaintext
Raw Normal View History

--- startproc.c
+++ startproc.c 2014-05-27 12:08:10.498235871 +0000
@@ -624,7 +624,7 @@ static int do_start(const char *inname,
char * redirect;
if (!(redirect = getenv("REDIRECT")))
redirect = "/dev/tty";
- if ((tty = open(redirect,O_WRONLY|O_NONBLOCK,0)) < 0)
+ if ((tty = open(redirect,O_RDWR|O_NONBLOCK,0)) < 0)
error(LSB_PROOF," cannot open %s: %s\n", redirect, strerror(errno));
dup2(tty, fileno(stdin));
dup2(tty, fileno(stdout));