aboutsummaryrefslogtreecommitdiff
path: root/ssh-agent-filter.C
diff options
context:
space:
mode:
Diffstat (limited to 'ssh-agent-filter.C')
-rw-r--r--ssh-agent-filter.C11
1 files changed, 5 insertions, 6 deletions
diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C
index 61acafe..4ebb204 100644
--- a/ssh-agent-filter.C
+++ b/ssh-agent-filter.C
@@ -326,7 +326,6 @@ void handle_client (int const sock) {
void sighandler (int sig) {
switch (sig) {
- case SIGINT:
case SIGPIPE:
break;
default:
@@ -363,12 +362,12 @@ int main (int const argc, char const * const * const argv) {
dup2(devnull, 1);
dup2(devnull, 2);
close(devnull);
-
- signal(SIGINT, sighandler);
- signal(SIGPIPE, sighandler);
- signal(SIGHUP, sighandler);
- signal(SIGTERM, sighandler);
}
+
+ signal(SIGINT, sighandler);
+ signal(SIGPIPE, sighandler);
+ signal(SIGHUP, sighandler);
+ signal(SIGTERM, sighandler);
int client_sock;
while ((client_sock = accept(listen_sock, nullptr, nullptr)) != -1) {