]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Ensure restartable system calls can restart (BSD signal semantics)
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 10 Jun 2010 07:52:34 +0000 (07:52 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 10 Jun 2010 07:52:34 +0000 (07:52 +0000)
This eliminates the annoying <beep> on the console.

(closes issue #17477)
 Reported by: jvandal
 Patches:
       20100610__issue17477.diff.txt uploaded by tilghman (license 14)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269635 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c
main/logger.c

index 0e1306fd8d928e70f02d04f5d7eed9d602f04111..db8271735ddf04340ec76b6cd6bc8e29afcc6212 100644 (file)
@@ -767,6 +767,7 @@ static void _null_sig_handler(int signal)
 
 static struct sigaction null_sig_handler = {
        .sa_handler = _null_sig_handler,
+       .sa_flags = SA_RESTART,
 };
 
 AST_MUTEX_DEFINE_STATIC(safe_system_lock);
@@ -1166,6 +1167,7 @@ static void _urg_handler(int num)
 
 static struct sigaction urg_handler = {
        .sa_handler = _urg_handler,
+       .sa_flags = SA_RESTART,
 };
 
 static void _hup_handler(int num)
@@ -1185,6 +1187,7 @@ static void _hup_handler(int num)
 
 static struct sigaction hup_handler = {
        .sa_handler = _hup_handler,
+       .sa_flags = SA_RESTART,
 };
 
 static void _child_handler(int sig)
@@ -1203,6 +1206,7 @@ static void _child_handler(int sig)
 
 static struct sigaction child_handler = {
        .sa_handler = _child_handler,
+       .sa_flags = SA_RESTART,
 };
 
 /*! \brief Set an X-term or screen title */
index c0df0d00c3358c286c1f472e3f28e908c45cdd23..741ffb96a1525fa85183f874644d29f47019f590 100644 (file)
@@ -584,6 +584,7 @@ static void _handle_SIGXFSZ(int sig)
 
 static struct sigaction handle_SIGXFSZ = {
        .sa_handler = _handle_SIGXFSZ,
+       .sa_flags = SA_RESTART,
 };
 
 int init_logger(void)