Fix login(8) reopen of /dev/tty as stdout.
This commit is contained in:
parent
3cfbdb29b5
commit
4441e279d7
|
@ -405,7 +405,7 @@ int main(void)
|
||||||
if ( !isatty(1) )
|
if ( !isatty(1) )
|
||||||
{
|
{
|
||||||
close(1);
|
close(1);
|
||||||
if ( open("/dev/tty", O_WRONLY) != 0 )
|
if ( open("/dev/tty", O_WRONLY) != 1 )
|
||||||
err(2, "/dev/tty");
|
err(2, "/dev/tty");
|
||||||
}
|
}
|
||||||
if ( !isatty(2) )
|
if ( !isatty(2) )
|
||||||
|
|
Loading…
Reference in New Issue