diff options
author | Damien Miller <djm@mindrot.org> | 1999-10-28 15:23:30 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-10-28 15:23:30 +1000 |
commit | 01ab4a25c84cdfba15c1c781ef93d24285d76eb5 (patch) | |
tree | a005726f953226ea49ac81c313da7e5bd2be0a70 /ssh-agent.c | |
parent | 29d685212f4792c084052f07006f57a50cc6f2c8 (diff) |
Merged latest OpenBSD changes.
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index 562f3ccd..56618ade 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -15,7 +15,7 @@ The authentication agent program. #include "config.h" #include "includes.h" -RCSID("$Id: ssh-agent.c,v 1.2 1999/10/28 03:25:17 damien Exp $"); +RCSID("$Id: ssh-agent.c,v 1.3 1999/10/28 05:23:30 damien Exp $"); #include "ssh.h" #include "rsa.h" @@ -536,6 +536,15 @@ main(int ac, char **av) exit(1); } + /* Create a new session and process group */ + if (setsid() < 0) { + perror("setsid failed"); + exit(1); + } + + /* Ignore if a client dies while we are sending a reply */ + signal(SIGPIPE, SIG_IGN); + sock = socket(AF_UNIX, SOCK_STREAM, 0); if (sock < 0) { |