[Asterisk-Users] CTRL+D exits Asterisk immediately

Jayson Vantuyl kagato at souja.net
Sun May 18 20:29:30 MST 2003


On Sun, May 18, 2003 at 03:03:28PM +0200, Roy Sigurd Karlsbakk wrote:
> hi all
> 
> when typing 'exit', asterisk complains and tells me to use STOP NOW, but not 
> with CTRL+D! CTRL+D stops Asterisk immediately, also when calls are in 
> progress (when asterisk is started with -c). Any chance to change this 
> behaviour?
> 
> roy
> 
> *CLI> exit
> The QUIT and EXIT commands may no longer be used to shutdown the PBX.
> Please use STOP NOW instead, if you wish to shutdown the PBX.
> *CLI> asterisk1:~#

CTRL-D triggers EOF for the input stream.  This kind of low-level event
shouldn't happen under *normal circumstances* so you can't really expect
to have any sort of interactive shutdown, so it should probably go down
hard.  CTRL-D is just not a nice way to tell * to shut down.

I'm not one of the people that make this decision, but I'd say probably
not.  As far as I know this is a situation that MUST be handled in a
noninteractive way, since it will presumably isn't limited to normal
exit conditions (the ssh or telnet that asterisk is loaded on gets
killed, although there might be a SIGHUP here).

For those in the know, is this accurate?

Jayson




More information about the asterisk-users mailing list