sync with OpenBSD -current
This commit is contained in:
parent
5d45cd7ee8
commit
155eb8555e
5506 changed files with 1786257 additions and 1416034 deletions
|
@ -36,20 +36,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "save.h"
|
||||
|
||||
#include <errno.h>
|
||||
#ifdef USG
|
||||
#ifndef __TYPES__
|
||||
#include <sys/types.h> /* forgot to protect it... */
|
||||
#define __TYPES__
|
||||
#endif /* __TYPES__ */
|
||||
#else
|
||||
#if defined(_POSIX_SOURCE) && defined(MOTOROLA)
|
||||
#undef _POSIX_SOURCE
|
||||
#include <sys/types.h>
|
||||
#define _POSIX_SOURCE
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#endif /* USG */
|
||||
|
||||
#ifdef X_POSIX_C_SOURCE
|
||||
#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
|
||||
|
@ -63,10 +50,6 @@ in this Software without prior written authorization from The Open Group.
|
|||
#else
|
||||
#define _POSIX_SOURCE
|
||||
#include <signal.h>
|
||||
#ifdef SCO325
|
||||
#include <sys/procset.h>
|
||||
#include <sys/siginfo.h>
|
||||
#endif
|
||||
#include <sys/wait.h>
|
||||
#undef _POSIX_SOURCE
|
||||
#endif
|
||||
|
@ -78,25 +61,17 @@ in this Software without prior written authorization from The Open Group.
|
|||
#define USE_POSIX_WAIT
|
||||
#endif
|
||||
|
||||
#if defined(linux) || defined(SYSV)
|
||||
#ifdef linux
|
||||
#define USE_SYSV_SIGNALS
|
||||
#endif
|
||||
|
||||
#if defined(SCO)
|
||||
#undef SIGTSTP /* defined, but not the BSD way */
|
||||
#endif
|
||||
|
||||
#if defined(X_NOT_POSIX) && defined(SYSV)
|
||||
#define SIGNALS_RESET_WHEN_CAUGHT
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "xsm.h"
|
||||
|
||||
int checkpoint_from_signal = 0;
|
||||
|
||||
|
||||
|
||||
static void
|
||||
Signal(int sig, void (*handler)(int))
|
||||
{
|
||||
|
@ -122,10 +97,6 @@ sig_child_handler (int sig)
|
|||
wait (NULL);
|
||||
#endif
|
||||
|
||||
#ifdef SIGNALS_RESET_WHEN_CAUGHT
|
||||
Signal (SIGCHLD, sig_child_handler);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The wait() above must come before re-establishing the signal handler.
|
||||
* In between this time, a new child might have died. If we can do
|
||||
|
@ -153,7 +124,7 @@ sig_child_handler (int sig)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
void
|
||||
sig_term_handler(int sig)
|
||||
{
|
||||
XtNoticeSignal(sig_term_id);
|
||||
|
@ -183,7 +154,7 @@ xt_sig_usr1_handler (XtPointer closure, XtSignalId *id)
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void
|
||||
register_signals (XtAppContext appContext)
|
||||
|
||||
|
@ -219,7 +190,7 @@ register_signals (XtAppContext appContext)
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int
|
||||
execute_system_command (char *s)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue