[Asterisk-Dev] Re: is this a bug?

Tom Ivar Helbekkmo tih at eunetnorge.no
Tue Jan 25 22:59:40 MST 2005


Tilghman Lesher <tilghman at mail.jeffandtilghman.com> writes:

> While the invalid pointer part *IS* a bug, shutting down because he
> pressed Ctrl-C is not a bug.  Do you disagree?

No, I don't disagree.

The invalid pointer, and the subsequent segmentation fault, are
symptoms of a bug.  The OP claims repeatability, so let's hope he can
supply a good traceback.

The fact that the '-c' flag will provide a full blown CLI with cooked
keyboard input and terminal editing using control keys, and still
shuts down on interrupt, is no bug, just bad design.  It breaks the
principle of least astonishment.  I've used such "stay in the
foreground" flags with more software than you can shake a stick at
(and usually stopped them with ^C, too), but that's daemons that you
make sit in the foreground for testing, for the simple reason that you
want debug messages on the console instead of in a log file.

Daemons with classic foreground modes I expect to stop on ^C, and
maybe to have an interrupt handler that lets them stop gracefully.
Applications that offer a CLI on the console, I expect to trap
interrupts differently, needing an explicit command, or ^D, to exit.
If the CLI has fancy command line editing, using something like
libreadline, I don't expect ^D to exit either.

-tih
-- 
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway Hosting
www.eunet.no  T +47-22092958 M +47-93013940 F +47-22092901 FWD 484145



More information about the asterisk-dev mailing list