summaryrefslogtreecommitdiff
path: root/ssh-agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index 562f3ccd9..56618aded 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -15,7 +15,7 @@ The authentication agent program.
15 15
16#include "config.h" 16#include "config.h"
17#include "includes.h" 17#include "includes.h"
18RCSID("$Id: ssh-agent.c,v 1.2 1999/10/28 03:25:17 damien Exp $"); 18RCSID("$Id: ssh-agent.c,v 1.3 1999/10/28 05:23:30 damien Exp $");
19 19
20#include "ssh.h" 20#include "ssh.h"
21#include "rsa.h" 21#include "rsa.h"
@@ -536,6 +536,15 @@ main(int ac, char **av)
536 exit(1); 536 exit(1);
537 } 537 }
538 538
539 /* Create a new session and process group */
540 if (setsid() < 0) {
541 perror("setsid failed");
542 exit(1);
543 }
544
545 /* Ignore if a client dies while we are sending a reply */
546 signal(SIGPIPE, SIG_IGN);
547
539 sock = socket(AF_UNIX, SOCK_STREAM, 0); 548 sock = socket(AF_UNIX, SOCK_STREAM, 0);
540 if (sock < 0) 549 if (sock < 0)
541 { 550 {