diff options
author | Christopher Faylor <me@cgf.cx> | 2002-11-15 19:04:36 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-11-15 19:04:36 +0000 |
commit | f319cb1ad3062aaaa78a4da95e9ee90278d8ec33 (patch) | |
tree | 1d10126e7dafe3efd675a04a3bd9af96a97607eb /winsup/cygwin/signal.cc | |
parent | 4b9ddc7dc9901970ca84b12289ba5d274cd15f3d (diff) | |
download | newlib-f319cb1ad3062aaaa78a4da95e9ee90278d8ec33.zip newlib-f319cb1ad3062aaaa78a4da95e9ee90278d8ec33.tar.gz newlib-f319cb1ad3062aaaa78a4da95e9ee90278d8ec33.tar.bz2 |
* include/cygwin/version.h: Bump API_MINOR to accommodate below changes.
* cygwin.din (siginterrupt): New export.
* signal.cc (siginterrupt): New.
Diffstat (limited to 'winsup/cygwin/signal.cc')
-rw-r--r-- | winsup/cygwin/signal.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 382a8a2..9c807f4 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -407,3 +407,16 @@ pause (void) { return handle_sigsuspend (myself->getsigmask ()); } + +extern "C" int +siginterrupt (int sig, int flag) +{ + struct sigaction act; + (void)sigaction(sig, NULL, &act); + if (flag) + act.sa_flags &= ~SA_RESTART; + else + act.sa_flags |= SA_RESTART; + return sigaction(sig, &act, NULL); +} + |