Make sure we close stdout, stdin and stderr after forking to background in order to properly detach from the TTY.
This commit is contained in:
parent
0d084a5e14
commit
ddc91d1640
|
@ -445,7 +445,13 @@ int main(int argc, char** argv)
|
|||
}
|
||||
else if (ret == 0)
|
||||
{
|
||||
/* child process */
|
||||
/* child process - detatch from TTY */
|
||||
fclose(stdin);
|
||||
fclose(stdout);
|
||||
fclose(stderr);
|
||||
close(0);
|
||||
close(1);
|
||||
close(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue