summaryrefslogtreecommitdiff
path: root/ssh-agent.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-agent.c')
-rw-r--r--ssh-agent.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index a9d2a1426..4f7f57f03 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.15 1999/10/28 08:43:10 markus Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.16 1999/10/28 20:41:23 markus Exp $ */
2 2
3/* 3/*
4 4
@@ -15,9 +15,8 @@ The authentication agent program.
15 15
16*/ 16*/
17 17
18#include "config.h"
19#include "includes.h" 18#include "includes.h"
20RCSID("$OpenBSD: ssh-agent.c,v 1.15 1999/10/28 08:43:10 markus Exp $"); 19RCSID("$OpenBSD: ssh-agent.c,v 1.16 1999/10/28 20:41:23 markus Exp $");
21 20
22#include "ssh.h" 21#include "ssh.h"
23#include "rsa.h" 22#include "rsa.h"
@@ -656,11 +655,17 @@ main(int ac, char **av)
656 close(1); 655 close(1);
657 close(2); 656 close(2);
658 657
659 if (ac == 0 && setsid() == -1) 658 if (setsid() == -1)
660 cleanup_exit(1); 659 {
660 perror("setsid");
661 cleanup_exit(1);
662 }
661 663
662 if (atexit(cleanup_socket) < 0) 664 if (atexit(cleanup_socket) < 0)
663 cleanup_exit(1); 665 {
666 perror("atexit");
667 cleanup_exit(1);
668 }
664 669
665 new_socket(AUTH_SOCKET, sock); 670 new_socket(AUTH_SOCKET, sock);
666 if (ac > 0) 671 if (ac > 0)