Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #include <signal.h> | |
| 2 #include "syscall.h" | |
| 3 #include "libc.h" | |
| 4 | |
| 5 int __sigaction(int, const struct sigaction *, struct sigaction *); | |
| 6 | |
| 7 void (*signal(int sig, void (*func)(int)))(int) | |
| 8 { | |
| 9 struct sigaction sa_old, sa = { .sa_handler = func, .sa_flags = SA_RESTA RT }; | |
| 10 if (__sigaction(sig, &sa, &sa_old) < 0) | |
| 11 return SIG_ERR; | |
| 12 return sa_old.sa_handler; | |
| 13 } | |
| 14 | |
| 15 weak_alias(signal, bsd_signal); | |
| 16 weak_alias(signal, __sysv_signal); | |
| OLD | NEW |