[Asterisk-Dev] is this a bug?

Nick Bachmann asterisk at not-real.org
Tue Jan 25 17:43:43 MST 2005


Chris Wade wrote:

> Did any of you actually check what -c does?  It runs asterisk in 
> console mode providing a CLI instead of daemon mode where it 
> immediately forks itself away from the controlling terminal.  If you 
> run asterisk with -c it MUST (read should according to standards) 

What standard is that?

> behave like any other linux process terminal and respond in some way 
> to ^C (in fact if it doesn't itself, linux will - by killing the process).

Huh? Ctrl+C just sends a signal (SIGINT) to the process.  What the 
program does with the signal is up to it... if it doesn't exit, the 
kernel isn't going to kill it.

>   And as for what * does when it sees ^C, it doesn't die with any 
> error other than a message from its input handling routines saying 
> input was interrupted (which is what ^C is by the way - an INTERRUPT).

In fact, it's a signal... the interrupt signal (that might be why they 
called it SIGINT :).

So the question is, does this behavior make sense? To me, having Ctrl+C 
do more of a '!' operation (getting rid of the console without killing 
Asterisk) makes a little more sense, but that's just me...

Nick



More information about the asterisk-dev mailing list