Skip to content

Commit ea8177d

Browse files
benh-debianchucklever
authored andcommitted
Revert "tlshd: Add a SIGINT handler"
This reverts commit bdc1bdb. Neither free() nor exit() are safe to call in a signal handler. Signed-off-by: Ben Hutchings <benh@debian.org>
1 parent 89e80e0 commit ea8177d

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/tlshd/main.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,6 @@ static void usage(char *progname)
6161
fprintf(stderr, "usage: %s [-chsv]\n", progname);
6262
}
6363

64-
static void tlshd_sigint(int signum)
65-
{
66-
if (signum == SIGINT) {
67-
tlshd_gnutls_priority_deinit();
68-
tlshd_config_shutdown();
69-
tlshd_log_shutdown();
70-
tlshd_log_close();
71-
exit(EXIT_SUCCESS);
72-
}
73-
}
74-
7564
int main(int argc, char **argv)
7665
{
7766
static gchar config_file[PATH_MAX + 1] = "/etc/tlshd.conf";
@@ -124,8 +113,6 @@ int main(int argc, char **argv)
124113
return EXIT_FAILURE;
125114
}
126115

127-
signal(SIGINT, tlshd_sigint);
128-
129116
tlshd_genl_dispatch();
130117

131118
tlshd_gnutls_priority_deinit();

0 commit comments

Comments
 (0)