version 1.13, 2003/05/30 17:58:20
|
version 1.18, 2004/11/21 00:38:26
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2004//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
# define PEGASUS_SIGPIPE SIGPIPE | # define PEGASUS_SIGPIPE SIGPIPE |
# define PEGASUS_SIGTERM SIGTERM | # define PEGASUS_SIGTERM SIGTERM |
# define PEGASUS_SIGUSR1 SIGUSR1 | # define PEGASUS_SIGUSR1 SIGUSR1 |
|
# define PEGASUS_SIGCHLD SIGCHLD |
| |
#else // PEGASUS_HAS_SIGNALS | #else // PEGASUS_HAS_SIGNALS |
| |
|
|
# define PEGASUS_SIGPIPE 13 | # define PEGASUS_SIGPIPE 13 |
# define PEGASUS_SIGTERM 15 | # define PEGASUS_SIGTERM 15 |
# define PEGASUS_SIGUSR1 16 | # define PEGASUS_SIGUSR1 16 |
|
# define PEGASUS_SIGCHLD 18 |
| |
#endif // PEGASUS_HAS_SIGNALS | #endif // PEGASUS_HAS_SIGNALS |
| |
| |
#if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) |
#if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || (PEGASUS_OS_SOLARIS) |
extern "C" { | extern "C" { |
#endif | #endif |
| |
typedef void (* signal_handler)(int, PEGASUS_SIGINFO_T *, void *); | typedef void (* signal_handler)(int, PEGASUS_SIGINFO_T *, void *); |
| |
#if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) |
#if defined(PEGASUS_PLATFORM_ZOS_ZSERIES_IBM) || (PEGASUS_OS_SOLARIS) |
} | } |
#endif | #endif |
| |
|
|
private: | private: |
| |
#ifdef PEGASUS_HAS_SIGNALS | #ifdef PEGASUS_HAS_SIGNALS |
|
static const unsigned PEGASUS_NSIG = 32; |
|
|
typedef struct { | typedef struct { |
|
int signum; |
int active; | int active; |
signal_handler sh; | signal_handler sh; |
struct sigaction oldsa; | struct sigaction oldsa; |
} register_handler; | } register_handler; |
| |
register_handler reg_handler[32]; |
register_handler reg_handler[PEGASUS_NSIG + 1]; |
Mutex reg_mutex; | Mutex reg_mutex; |
| |
void deactivate_i(Uint32 signum); |
void deactivate_i(register_handle &rh); |
|
|
|
register_handler &getHandler(Uint32 sigum) const; |
#endif | #endif |
| |
}; | }; |