diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-12 22:03:10 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-12 22:03:10 +0000 |
commit | fa256972fbe5f5efbeb59468ac84f311b97a4cb1 (patch) | |
tree | 1deab344d862b70d1b55fb5e96abe70fc9923d37 /main/asterisk.c | |
parent | 38acbe34c17126b5f3185c689b0f83f58298b5f1 (diff) |
Simple fix for Ctrl-C not immediately exiting Asterisk, but also add a
pointer inside editline to look back to asterisk.c, so others don't spend
as much time as I did looking (in the wrong place) for the appropriate
function.
Reported by: ZX81, via the #asterisk-users channel
Fixed by: me (license 14)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@163761 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/asterisk.c')
-rw-r--r-- | main/asterisk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 3dad454d5..3ed7fff22 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -1777,6 +1777,8 @@ static int ast_el_read_char(EditLine *el, char *cp) } res = poll(fds, max, -1); if (res < 0) { + if (sig_flags.need_quit) + break; if (errno == EINTR) continue; ast_log(LOG_ERROR, "poll failed: %s\n", strerror(errno)); |