summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/ssh-agent.c')
-rw-r--r--usr.bin/ssh/ssh-agent.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-agent.c b/usr.bin/ssh/ssh-agent.c
index 2d33bc1c804..fbf02e3e875 100644
--- a/usr.bin/ssh/ssh-agent.c
+++ b/usr.bin/ssh/ssh-agent.c
@@ -14,7 +14,7 @@ The authentication agent program.
*/
#include "includes.h"
-RCSID("$Id: ssh-agent.c,v 1.13 1999/10/27 16:37:45 deraadt Exp $");
+RCSID("$Id: ssh-agent.c,v 1.14 1999/10/27 23:34:53 markus Exp $");
#include "ssh.h"
#include "rsa.h"
@@ -530,6 +530,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)
{