diff options
-rw-r--r-- | src/backend/port/sysv_sema.c | 4 | ||||
-rw-r--r-- | src/port/pqsignal.c | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index 65f922e0230..2988561d0ae 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -405,8 +405,8 @@ PGSemaphoreLock(PGSemaphore sema, bool interruptOK) * it's necessary for cancel/die interrupts to be serviced directly by the * signal handler. On these platforms the behavior is really the same * whether the signal arrives just before the semop() begins, or while it - * is waiting. The loop on EINTR is thus important only for other types - * of interrupts. + * is waiting. The loop on EINTR is thus important only for platforms + * without SA_RESTART. */ do { diff --git a/src/port/pqsignal.c b/src/port/pqsignal.c index 1511e932afe..8c82c9371c0 100644 --- a/src/port/pqsignal.c +++ b/src/port/pqsignal.c @@ -60,9 +60,7 @@ pqsignal(int signo, pqsigfunc func) act.sa_handler = func; sigemptyset(&act.sa_mask); - act.sa_flags = 0; - if (signo != SIGALRM) - act.sa_flags |= SA_RESTART; + act.sa_flags = SA_RESTART; #ifdef SA_NOCLDSTOP if (signo == SIGCHLD) act.sa_flags |= SA_NOCLDSTOP; |