From: Avi K. <av...@ar...> - 2004-09-30 02:36:58
|
pptp sometimes crashes in pptp_fd_set and leaves a core dump on my root. I think this is due to a signal being caught and longjmp'ed to callmgr_main's shutdown label after we are out of that function, causing garbage local variables to be used. RCS file: /cvsroot/pptpclient/pptp-linux/pptp_callmgr.c,v retrieving revision 1.16 diff -u -w -a -u -p -r1.16 pptp_callmgr.c --- pptp_callmgr.c 21 Jul 2004 09:05:07 -0000 1.16 +++ pptp_callmgr.c 30 Sep 2004 02:27:08 -0000 @@ -239,6 +239,8 @@ skip_accept: /* Step 5c: Handle socket c } while (vector_size(call_list) > 0 || first); shutdown: { + signal(SIGINT, callmgr_do_nothing); + signal(SIGTERM, callmgr_do_nothing); fd_set read_set, write_set; struct timeval tv; /* warn("Shutdown"); */ @@ -281,6 +283,8 @@ shutdown: vector_destroy(call_list); } cleanup: + signal(SIGINT, callmgr_do_nothing); + signal(SIGTERM, callmgr_do_nothing); close_inetsock(inet_sock, inetaddr); close_unixsock(unix_sock, inetaddr); return 0; (setjmp/longjmp? why, oh why?) not subscribed. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. |