* cygwin.din: Export sigignore and sigset.
* exceptions.cc (sigset): New function. (sigignore): New function. * include/cygwin/signal.h (SIG_HOLD): Define. (sigignore): Declare. (sigset): Declare. * include/cygwin/version.h: Bump API minor number to 154.
This commit is contained in:
		@@ -1,3 +1,13 @@
 | 
			
		||||
2006-02-16  Corinna Vinschen  <corinna@vinschen.de>
 | 
			
		||||
 | 
			
		||||
	* cygwin.din: Export sigignore and sigset.
 | 
			
		||||
	* exceptions.cc (sigset): New function.
 | 
			
		||||
	(sigignore): New function.
 | 
			
		||||
	* include/cygwin/signal.h (SIG_HOLD): Define.
 | 
			
		||||
	(sigignore): Declare.
 | 
			
		||||
	(sigset): Declare.
 | 
			
		||||
	* include/cygwin/version.h: Bump API minor number to 154.
 | 
			
		||||
 | 
			
		||||
2006-02-13  Igor Peshansky  <pechtcha@cs.nyu.edu>
 | 
			
		||||
 | 
			
		||||
	* include/mntent.h: Add missing #include.
 | 
			
		||||
 
 | 
			
		||||
@@ -1284,6 +1284,7 @@ sigdelset SIGFE
 | 
			
		||||
sigemptyset NOSIGFE
 | 
			
		||||
sigfillset NOSIGFE
 | 
			
		||||
sighold SIGFE
 | 
			
		||||
sigignore SIGFE
 | 
			
		||||
sigqueue SIGFE
 | 
			
		||||
siginterrupt SIGFE
 | 
			
		||||
sigismember SIGFE
 | 
			
		||||
@@ -1294,6 +1295,7 @@ sigpause SIGFE
 | 
			
		||||
sigpending SIGFE
 | 
			
		||||
sigprocmask SIGFE
 | 
			
		||||
sigrelse SIGFE
 | 
			
		||||
sigset SIGFE
 | 
			
		||||
sigsuspend SIGFE
 | 
			
		||||
sigwait SIGFE
 | 
			
		||||
sigwaitinfo SIGFE
 | 
			
		||||
 
 | 
			
		||||
@@ -1021,6 +1021,50 @@ sigrelse (int sig)
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
extern "C" _sig_func_ptr
 | 
			
		||||
sigset (int sig, _sig_func_ptr func)
 | 
			
		||||
{
 | 
			
		||||
  sig_dispatch_pending ();
 | 
			
		||||
  _sig_func_ptr prev;
 | 
			
		||||
 | 
			
		||||
  /* check that sig is in right range */
 | 
			
		||||
  if (sig < 0 || sig >= NSIG || sig == SIGKILL || sig == SIGSTOP)
 | 
			
		||||
    {
 | 
			
		||||
      set_errno (EINVAL);
 | 
			
		||||
      syscall_printf ("SIG_ERR = sigset (%d, %p)", sig, func);
 | 
			
		||||
      return (_sig_func_ptr) SIG_ERR;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  mask_sync.acquire (INFINITE);
 | 
			
		||||
  sigset_t mask = myself->getsigmask ();
 | 
			
		||||
  /* If sig was in the signal mask return SIG_HOLD, otherwise return the
 | 
			
		||||
     previous disposition. */
 | 
			
		||||
  if (sigismember (&mask, sig))
 | 
			
		||||
    prev = SIG_HOLD;
 | 
			
		||||
  else
 | 
			
		||||
    prev = global_sigs[sig].sa_handler;
 | 
			
		||||
  /* If func is SIG_HOLD, add sig to the signal mask, otherwise set the
 | 
			
		||||
     disposition to func and remove sig from the signal mask. */
 | 
			
		||||
  if (func == SIG_HOLD)
 | 
			
		||||
    sigaddset (&mask, sig);
 | 
			
		||||
  else
 | 
			
		||||
    {
 | 
			
		||||
      /* No error checking.  The test which could return SIG_ERR has already
 | 
			
		||||
         been made above. */
 | 
			
		||||
      signal (sig, func);
 | 
			
		||||
      sigdelset (&mask, sig);
 | 
			
		||||
    }
 | 
			
		||||
  set_signal_mask (mask, myself->getsigmask ());
 | 
			
		||||
  mask_sync.release ();
 | 
			
		||||
  return prev;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
extern "C" int
 | 
			
		||||
sigignore (int sig)
 | 
			
		||||
{
 | 
			
		||||
  return sigset (sig, SIG_IGN) == SIG_ERR ? -1 : 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Update the signal mask for this process and return the old mask.
 | 
			
		||||
   Called from sigdelayed */
 | 
			
		||||
extern "C" sigset_t
 | 
			
		||||
 
 | 
			
		||||
@@ -254,10 +254,15 @@ struct sigaction
 | 
			
		||||
#define SIGRTMAX ((SIGRTMIN) + 0)
 | 
			
		||||
#define NSIG	33      /* signal 0 implied */
 | 
			
		||||
 | 
			
		||||
#define SIG_HOLD ((_sig_func_ptr)2)	/* Signal in signal mask */
 | 
			
		||||
 | 
			
		||||
int sigwait (const sigset_t *, int *);
 | 
			
		||||
int sigwaitinfo (const sigset_t *, siginfo_t *);
 | 
			
		||||
int sighold (int);
 | 
			
		||||
int sigignore (int);
 | 
			
		||||
int sigrelse (int);
 | 
			
		||||
_sig_func_ptr sigset (int, _sig_func_ptr);
 | 
			
		||||
 | 
			
		||||
int sigqueue(pid_t, int, const union sigval);
 | 
			
		||||
int siginterrupt (int, int);
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
 
 | 
			
		||||
@@ -286,12 +286,13 @@ details. */
 | 
			
		||||
      151: Export __opendir_with_d_ino
 | 
			
		||||
      152: Revert to having d_ino in dirent unconditionally.
 | 
			
		||||
      153: Export updwtmpx, Implement CW_SETUP_WINENV.
 | 
			
		||||
      154: Export sigset, sigignore.
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
     /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
 | 
			
		||||
 | 
			
		||||
#define CYGWIN_VERSION_API_MAJOR 0
 | 
			
		||||
#define CYGWIN_VERSION_API_MINOR 153
 | 
			
		||||
#define CYGWIN_VERSION_API_MINOR 154
 | 
			
		||||
 | 
			
		||||
     /* There is also a compatibity version number associated with the
 | 
			
		||||
	shared memory regions.  It is incremented when incompatible
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user