[C++] Run in background when Ctrl+C entered [RESOLVED]
I'm not sure how many of you have used the Asterisk PBX but what I'd like to do is have my application run in the background, instead of closing, when Ctrl+C is pressed. Asterisk does this and you then run 'asterisk -r' to connect to it again.
Any ideas how I could do this? Thank you |
do you just mean how do you background a process? Ctrl+z then run "bg".
|
No I already know how to run a process in the background. It's a similar thing to that, however, in Asterisk I simply hit Ctrl+C and it runs in the background. I reconnect to the running PBX by passing an R argument.
|
Asterisk is already running in the background. if you start asterisk with asterisk -r, you only use the new asterisk process as an terminal client to connect to the asterisk process which is running in server mode. if you hit ctrl+c, you just kill the client which communicates via IPC with the asterisk server.
|
Thank you. That's what I needed to know.
|
All times are GMT -5. The time now is 03:09 PM. |