Displaying 3 results from an estimated 3 matches for "caught_sighup".
2009 Jul 19
3
[PATCH] tftpd.c: write a pid file in standalone mode
...f.hu>
---
tftpd/tftpd.c | 38 ++++++++++++++++++++++++++++++++++----
1 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/tftpd/tftpd.c b/tftpd/tftpd.c
index ff39c85..d38a961 100644
--- a/tftpd/tftpd.c
+++ b/tftpd/tftpd.c
@@ -144,6 +144,13 @@ static void handle_sighup(int sig)
caught_sighup = 1;
}
+/* Handle exit requests by SIGTERM and SIGINT */
+static volatile sig_atomic_t exit_signal = 0;
+static void handle_exit(int sig)
+{
+ exit_signal = sig;
+}
+
/* Handle timeout signal or timeout event */
void timer(int sig)
{
@@ -318,9 +325,10 @@ static struct option long_options[]...
2009 Sep 05
5
[tftpd PATCH 0/5] pidfile option and syslog fix
Hi,
This is my current patch queue. The patches are independent, AFAIK,
so feel free to cherry-pick or reject them independently.
The bottom one was needed for a successful build here; the top one
contains all the modifications you requested on IRC, and more.
Meanwhile I hit one of the four stray TABs in tftpd.c, and decided to
get rid of them.
Comments welcome.
---
Ferenc Wagner (5):
2003 May 19
0
[PATCH] getpwnam() implementation in tftpd.c
...+ return NULL;
+
+ while ((passwd = __getpwent(passwd_fd)) != NULL)
+ if (!strcmp(passwd->pw_name, name)) {
+ close(passwd_fd);
+ return passwd;
+ }
+
+ close(passwd_fd);
+ return NULL;
+}
+#endif /* USE_PRIVATE_PWD_GRP */
+
+
/* Simple handler for SIGHUP */
static volatile sig_atomic_t caught_sighup = 0;
static void handle_sighup(int sig)
@@ -247,6 +394,7 @@
}
}
+
int
main(int argc, char **argv)
{