X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprocess.c;h=37b3186e68508424c3e23a5b358a27103c3a2a1c;hp=d618427d5357c3f89ea13e23809851d8d5043e29;hb=68e23b1c9e69b2a218b3be821ad1ba3b3b6a64f2;hpb=b413257e10ae0645da43583dd8f84a1f74df5bd7 diff --git a/src/process.c b/src/process.c index d618427d..37b3186e 100644 --- a/src/process.c +++ b/src/process.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: process.c,v 1.1.2.22 2001/03/13 09:55:14 guus Exp $ + $Id: process.c,v 1.1.2.24 2001/09/01 12:36:53 guus Exp $ */ #include "config.h" @@ -121,7 +121,7 @@ cp /* kill older tincd for this net */ -int kill_other(void) +int kill_other(int signal) { int pid; cp @@ -136,7 +136,7 @@ cp errno = 0; /* No error, sometimes errno is only changed on error */ /* ESRCH is returned when no process with that pid is found */ - if(kill(pid, SIGTERM) && errno == ESRCH) + if(kill(pid, signal) && errno == ESRCH) fprintf(stderr, _("Removing stale lock file.\n")); remove_pid(pidfilename); cp @@ -164,7 +164,7 @@ cp { if(daemon(0, 0) < 0) { - fprintf(stderr, _("Couldn't detach from terminal: %m")); + fprintf(stderr, _("Couldn't detach from terminal: %s"), strerror(errno)); return -1; } @@ -427,7 +427,7 @@ setup_signals(void) { act.sa_sigaction = sighandlers[i].handler; if(sigaction(sighandlers[i].signal, &act, NULL) < 0) - fprintf(stderr, _("Installing signal handler for signal %d (%s) failed: %m\n"), - sighandlers[i].signal, strsignal(sighandlers[i].signal)); + fprintf(stderr, _("Installing signal handler for signal %d (%s) failed: %s\n"), + sighandlers[i].signal, strsignal(sighandlers[i].signal), strerror(errno)); } }