Put the new server into its own session.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19664 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-12-31 16:33:21 +00:00
parent c30e35eb9b
commit 16aceec16e

View File

@ -439,6 +439,9 @@ Services::_LaunchService(struct service& service, int socket)
pid_t child = fork();
if (child == 0) {
setsid();
// make sure we're in our own session, and don't accidently quit the net_server
// We're the child, replace standard input/output
dup2(socket, STDIN_FILENO);
dup2(socket, STDOUT_FILENO);