projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3892182
)
Implement sigaction for Windows.
author
Bruce Cran
<bruce@cran.org.uk>
Wed, 22 Feb 2012 19:56:22 +0000
(19:56 +0000)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 22 Feb 2012 20:11:35 +0000
(21:11 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
os/windows/posix.c
patch
|
blob
|
blame
|
history
diff --git
a/os/windows/posix.c
b/os/windows/posix.c
index ea3736d5f78753394d683da8aebb3bf6d879499b..ba7abb54a97b6fd2473ed975bcbc58cb1f3ae05a 100755
(executable)
--- a/
os/windows/posix.c
+++ b/
os/windows/posix.c
@@
-124,8
+124,17
@@
void syslog(int priority, const char *message, ... /* argument */)
int sigaction(int sig, const struct sigaction *act,
struct sigaction *oact)
{
- errno = ENOSYS;
- return (-1);
+ int rc = 0;
+ void (*prev_handler)(int);
+
+ prev_handler = signal(sig, act->sa_handler);
+ if (oact != NULL)
+ oact->sa_handler = prev_handler;
+
+ if (prev_handler == SIG_ERR)
+ rc = -1;
+
+ return rc;
}
int lstat(const char * path, struct stat * buf)