[Asterisk-Dev] is this a bug?

Chris Wade clwade at sparco.com
Tue Jan 25 13:05:00 MST 2005


Andrew Kohlsmith wrote:
> On January 25, 2005 12:59 pm, Steven Critchfield wrote:
> 
>>Ctrl-c is actually an interupt. Windows users needed easy to remember
>>shortcuts, thats why you are used to ctrl-c.
> 
> 
> Yes but why does ^C only interrupt asterisk when -c (colour) is given?  To me 
> this is a bug.  Asterisk should either always trap these key sequences or 
> always pass them, irrespective of your desire to see coloured console 
> messages.

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) 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).  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).

So exactly why is this a bug?

-Chris

PS. below is the 'asterisk -h' from CVS-HEAD, notice the only mention of 
color is the '-n' option, not the '-c' option.... :)

Asterisk CVS-HEAD-01/24/05-10:35:33, Copyright (C) 2000 - 2005, Digium.
Usage: asterisk [OPTIONS]
Valid Options:
    -V              Display version number and exit
    -C <configfile> Use an alternate configuration file
    -G <group>      Run as a group other than the caller
    -U <user>       Run as a user other than the caller
    -c              Provide console CLI
    -d              Enable extra debugging
    -f              Do not fork
    -g              Dump core in case of a crash
    -h              This help screen
    -i              Initialize crypto keys at startup
    -n              Disable console colorization
    -p              Run as pseudo-realtime thread
    -q              Quiet mode (suppress output)
    -r              Connect to Asterisk on this machine
    -R              Connect to Asterisk, and attempt to reconnect if 
disconnected
    -t              Record soundfiles in /var/tmp and move them where 
they belong after they are done.
    -v              Increase verbosity (multiple v's = more verbose)
    -x <cmd>        Execute command <cmd> (only valid with -r)




More information about the asterisk-dev mailing list