From: SourceForge.net <no...@so...> - 2005-07-08 10:10:51
|
Bugs item #1230150, was opened at 2005-06-29 23:42 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719006&aid=1230150&group_id=130646 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Tcl-API Group: Current Status: Open Resolution: None Priority: 5 Submitted By: Bernd Eidenschink (eide) Assigned to: Nobody/Anonymous (nobody) Summary: ns_log Fatal does not shutdown server Initial Comment: In nsd/log.c one noted side effect of the severity flag "fatal" given to ns_log is "WILL CAUSE AOLSERVER TO EXIT!". AFAIK this does not work, e.g. in command mode NaviServer happily logs but does not exit. ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-07-08 04:10 Message: Logged In: YES user_id=87254 The Fatal log level is used only twice in the source code: once in the Ns_Fatal command which then calls _exit(), and once in the fatal signal handler which then calls abort(). I don't think you can have Ns_Log exit the process. Tcl code should not, in general, be logging fatal errors because, in general, it's hard to get Tcl fataly wrong. I was saying it would be a bad design to ns_log fatal, not that there aren't other ways to shutdown the server and we need to hide them... :-) The only thing I'd change is the documentation: don't mention 'fatal' as a valid level in the Tcl docs. ---------------------------------------------------------------------- Comment By: Zoran Vasiljevic (vasiljevic) Date: 2005-07-07 01:03 Message: Logged In: YES user_id=95086 The "fatal" severity would/should trigger server to go down. Even from Tcl scripts. Otherwise the "fatal" has no real meaning. ---------------------------------------------------------------------- Comment By: Bernd Eidenschink (eide) Date: 2005-07-06 04:31 Message: Logged In: YES user_id=197910 >I'm not sure whether it's a good idea for Tcl procs to >shutdown the server like that. It should be prety difficult >to get into a 'Fatal' situation with Tcl... But they can already do 'ns_shutdown (-restart)'. And many, many more nasty things ;-) IMHO, without a general concept to disarm the developers and their scripts, it should shutdown the server. At least it was always documented that way (in the ancient docs) and people believed it :-) Or we make it a config option: ns_param ShutdownAtFatal true ? ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-07-06 03:26 Message: Logged In: YES user_id=87254 This comment goes with the function Ns_Fatal(), which does indeed call _exit(1) which should shutdown the server :-) I'm not sure whether it's a good idea for Tcl procs to shutdown the server like that. It should be prety difficult to get into a 'Fatal' situation with Tcl... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719006&aid=1230150&group_id=130646 |