* Add configure tests for SA_RESTART signal constant and sa_len
* protect use of SA_RESTART in event library This commit was SVN r3838.
Этот коммит содержится в:
родитель
32d85dd7eb
Коммит
bb7de89545
18
configure.ac
18
configure.ac
@ -553,7 +553,25 @@ AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h dlfcn.h \
|
||||
# rpc/types.h rpc/xdr.h sched.h strings.h
|
||||
|
||||
# SA_RESTART in signal.h
|
||||
AC_MSG_CHECKING([if SA_RESTART defined in signal.h])
|
||||
AC_EGREP_CPP(yes, [
|
||||
#include <signal.h>
|
||||
#ifdef SA_RESTART
|
||||
yes
|
||||
#endif ], [MSG=yes VALUE=1], [MSG=no VALUE=0])
|
||||
AC_DEFINE_UNQUOTED(OMPI_HAVE_SA_RESTART, $VALUE,
|
||||
[Whether we have SA_RESTART in <signal.h> or not])
|
||||
AC_MSG_RESULT([$MSG])
|
||||
|
||||
# sa_len in struct sockaddr
|
||||
AC_MSG_CHECKING([for sa_len in struct sockaddr])
|
||||
AC_TRY_COMPILE([#include <sys/types.h>
|
||||
#include <sys/socket.h>], [struct sockaddr s; s.sa_len;],
|
||||
[MSG=yes VALUE=1], [MSG=no VALUE=0])
|
||||
AC_DEFINE_UNQUOTED(OMPI_HAVE_SA_LEN, $VALUE,
|
||||
[Whether we have the sa_len struct in <sys/socket.h> or not])
|
||||
AC_MSG_RESULT([$MSG])
|
||||
|
||||
# union semun in sys/sem.h
|
||||
|
||||
# Note that sometimes we have <stdbool.h>, but it doesn't work (e.g.,
|
||||
|
@ -169,7 +169,9 @@ ompi_evsignal_recalc(sigset_t *evsigmask)
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sa.sa_handler = ompi_evsignal_handler;
|
||||
sa.sa_mask = *evsigmask;
|
||||
#if OMPI_HAVE_SA_RESTART
|
||||
sa.sa_flags |= SA_RESTART;
|
||||
#endif
|
||||
|
||||
TAILQ_FOREACH(ev, &ompi_signalqueue, ev_signal_next) {
|
||||
if (sigaction(OMPI_EVENT_SIGNAL(ev), &sa, NULL) == -1)
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user