diff options
author | Yang Tse <yangsita@gmail.com> | 2009-11-27 12:01:25 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-11-27 12:01:25 +0000 |
commit | f07f17f2a4f108db46ad3d92d7bd6b2739e6eea9 (patch) | |
tree | daf5032edac2b29420bc2374e1d6f1268b2da754 /tests/server/sws.c | |
parent | c7136274125d311970ec5e39362a4fa026a52160 (diff) |
Log sws IPv version, port and pid when exiting due to SIGINT or SIGTERM.
Diffstat (limited to 'tests/server/sws.c')
-rw-r--r-- | tests/server/sws.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c index 27434606d..de16199d2 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -997,6 +997,7 @@ int main(int argc, char *argv[]) int rc; int error; int arg=1; + long pid; #ifdef CURL_SWS_FORK_ENABLED bool use_fork = FALSE; #endif @@ -1052,6 +1053,8 @@ int main(int argc, char *argv[]) install_signal_handlers(); + pid = (long)getpid(); + #ifdef ENABLE_IPV6 if(!use_ipv6) #endif @@ -1262,7 +1265,8 @@ sws_cleanup: restore_signal_handlers(); if(got_exit_signal) { - logmsg("========> sws exits with signal (%d)", exit_signal); + logmsg("========> %s sws (port: %d pid: %ld) exits with signal (%d)", + ipv_inuse, (int)port, pid, exit_signal); /* * To properly set the return status of the process we * must raise the same signal SIGINT or SIGTERM that we |