view msdos/sigaction.c @ 49426:7ac32aa920b9

(Info-extract-menu-node-name): When looking for end of menu item, don't stop at first ":"; instead, continue until trailing context is either a space or newline. (Info-complete-menu-item): Change var `pattern' to allow ":" in menu item. (Info-menu): Likewise, for regexp used in backwards search. (Info-try-follow-nearest-node): Remove case added in previous edit. Instead, change the regexp in the following case to allow ":" in menu item. (Info-fontify-node): Fix bug: Handle `next-property-change' returning point-max as "hasn't already been done".
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Sat, 25 Jan 2003 02:44:07 +0000
parents 354e0c45cedf
children 695cf19ef79e
line wrap: on
line source

/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
#include <signal.h>
#include <errno.h>

int
sigaction(int _sig, const struct sigaction *_act, struct sigaction *_oact)
{
  int retval = 0;

  if (_oact)
  {
    void (*installed_sig)(int) = signal (_sig, SIG_IGN);

    /* FIXME */
    if (installed_sig == SIG_ERR)
    {
      retval = -1;
      errno = EINVAL;
    }
    else
      signal (_sig, installed_sig);
    _oact->sa_handler = installed_sig;
    retval = sigemptyset (&_oact->sa_mask);
    _oact->sa_flags = 0;
  }
  if (_act)
  {
    if (signal (_sig, _act->sa_handler) == SIG_ERR)
    {
      retval = -1;
      errno = EINVAL;
    }
  }
  return 0;
}