mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Fix connecting the stdin of tor-fw-helper to /dev/null
This wasn't working due to the parameters of dup2 being in the wrong order. As a result, tor-fw-helper was inheriting the stdin of Tor.
This commit is contained in:
parent
9908404f01
commit
d5127ebdd8
@ -2988,7 +2988,7 @@ tor_spawn_background(const char *const filename, int *stdout_read,
|
||||
/* Link stdin to /dev/null */
|
||||
fd = open("/dev/null", O_RDONLY); /* NOT cloexec, obviously. */
|
||||
if (fd != -1)
|
||||
dup2(STDIN_FILENO, fd);
|
||||
dup2(fd, STDIN_FILENO);
|
||||
else
|
||||
goto error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user