1998-10-24 21:41:42 -04:00
|
|
|
/* Generic signal.h */
|
1999-08-30 04:08:00 -04:00
|
|
|
/* $OpenLDAP$ */
|
2003-11-25 23:16:36 -05:00
|
|
|
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
|
|
|
|
|
*
|
2006-01-03 18:11:52 -05:00
|
|
|
* Copyright 1998-2006 The OpenLDAP Foundation.
|
1998-12-28 14:51:35 -05:00
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
2001-05-28 23:35:56 -04:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
|
* modification, are permitted only as authorized by the OpenLDAP
|
2003-11-25 18:17:08 -05:00
|
|
|
* Public License.
|
|
|
|
|
*
|
|
|
|
|
* A copy of this license is available in file LICENSE in the
|
|
|
|
|
* top-level directory of the distribution or, alternatively, at
|
|
|
|
|
* <http://www.OpenLDAP.org/license.html>.
|
1998-12-28 14:51:35 -05:00
|
|
|
*/
|
1998-10-24 21:41:42 -04:00
|
|
|
|
|
|
|
|
#ifndef _AC_SIGNAL_H
|
|
|
|
|
#define _AC_SIGNAL_H
|
|
|
|
|
|
|
|
|
|
#include <signal.h>
|
|
|
|
|
|
1999-05-24 19:01:57 -04:00
|
|
|
#undef SIGNAL
|
2000-07-21 20:37:51 -04:00
|
|
|
|
|
|
|
|
#if defined( HAVE_SIGACTION )
|
|
|
|
|
#define SIGNAL lutil_sigaction
|
|
|
|
|
typedef void (*lutil_sig_t)(int);
|
2000-07-24 19:59:25 -04:00
|
|
|
LDAP_LUTIL_F(lutil_sig_t) lutil_sigaction( int sig, lutil_sig_t func );
|
2000-07-21 20:37:51 -04:00
|
|
|
#define SIGNAL_REINSTALL(sig,act) (void)0
|
|
|
|
|
#elif defined( HAVE_SIGSET )
|
1998-10-24 21:41:42 -04:00
|
|
|
#define SIGNAL sigset
|
2000-07-21 20:37:51 -04:00
|
|
|
#define SIGNAL_REINSTALL sigset
|
1998-10-24 21:41:42 -04:00
|
|
|
#else
|
|
|
|
|
#define SIGNAL signal
|
2000-07-21 20:37:51 -04:00
|
|
|
#define SIGNAL_REINSTALL signal
|
1998-10-24 21:41:42 -04:00
|
|
|
#endif
|
|
|
|
|
|
1998-11-18 12:45:32 -05:00
|
|
|
#if !defined( LDAP_SIGUSR1 ) || !defined( LDAP_SIGUSR2 )
|
|
|
|
|
#undef LDAP_SIGUSR1
|
|
|
|
|
#undef LDAP_SIGUSR2
|
|
|
|
|
|
1999-10-30 22:26:41 -04:00
|
|
|
# if defined(WINNT) || defined(_WINNT) || defined(_WIN32)
|
1999-10-28 03:27:00 -04:00
|
|
|
# define LDAP_SIGUSR1 SIGILL
|
|
|
|
|
# define LDAP_SIGUSR2 SIGTERM
|
|
|
|
|
|
|
|
|
|
# elif !defined(HAVE_LINUX_THREADS)
|
1998-11-18 12:45:32 -05:00
|
|
|
# define LDAP_SIGUSR1 SIGUSR1
|
|
|
|
|
# define LDAP_SIGUSR2 SIGUSR2
|
|
|
|
|
|
|
|
|
|
# else
|
|
|
|
|
/*
|
2000-06-23 20:46:07 -04:00
|
|
|
* Some versions of LinuxThreads unfortunately uses the only
|
|
|
|
|
* two signals reserved for user applications. This forces
|
|
|
|
|
* OpenLDAP to use other signals reserved for other uses.
|
|
|
|
|
*/
|
2001-12-23 22:49:54 -05:00
|
|
|
|
1998-11-18 12:45:32 -05:00
|
|
|
# if defined( SIGSTKFLT )
|
|
|
|
|
# define LDAP_SIGUSR1 SIGSTKFLT
|
|
|
|
|
# elif defined ( SIGSYS )
|
|
|
|
|
# define LDAP_SIGUSR1 SIGSYS
|
|
|
|
|
# endif
|
|
|
|
|
|
1998-11-22 05:26:51 -05:00
|
|
|
# if defined( SIGUNUSED )
|
1998-11-18 12:45:32 -05:00
|
|
|
# define LDAP_SIGUSR2 SIGUNUSED
|
|
|
|
|
# elif defined ( SIGINFO )
|
1998-11-25 18:35:04 -05:00
|
|
|
# define LDAP_SIGUSR2 SIGINFO
|
1998-11-18 12:45:32 -05:00
|
|
|
# elif defined ( SIGEMT )
|
1998-11-25 18:35:04 -05:00
|
|
|
# define LDAP_SIGUSR2 SIGEMT
|
1998-11-18 12:45:32 -05:00
|
|
|
# endif
|
|
|
|
|
# endif
|
|
|
|
|
#endif
|
|
|
|
|
|
1999-03-29 04:04:35 -05:00
|
|
|
#ifndef LDAP_SIGCHLD
|
|
|
|
|
#ifdef SIGCHLD
|
|
|
|
|
#define LDAP_SIGCHLD SIGCHLD
|
|
|
|
|
#elif SIGCLD
|
|
|
|
|
#define LDAP_SIGCHLD SIGCLD
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
1998-10-24 21:41:42 -04:00
|
|
|
#endif /* _AC_SIGNAL_H */
|