summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-agent.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>1999-10-27 23:34:53 +0000
committermarkus <markus@openbsd.org>1999-10-27 23:34:53 +0000
commit226bd85e9f57c9fd098a9ca02dc2b9221a1586a6 (patch)
tree9f0d906c20e6dfbf8e208064eaefc1a352bcdf49 /usr.bin/ssh/ssh-agent.c
parentUpdate man page for LMC1200 support (diff)
downloadwireguard-openbsd-226bd85e9f57c9fd098a9ca02dc2b9221a1586a6.tar.xz
wireguard-openbsd-226bd85e9f57c9fd098a9ca02dc2b9221a1586a6.zip
ignore sigpipe, do not die if the client (ssh-add, ssh) dies, ok: niklas@
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)
{