* path.cc (normalize_posix_path): Reorganize to short circuit to DOS path
handling whenever a '\' is detected. * signal.cc (sigaction): Make strace output more informative. * sigproc.cc (pending_signals::add): Just index directly into signal array rather than treating the array as a heap. (pending_signals::del): Ditto. (wait_sig): Don't send signal if we already have a similar signal queued. * sigproc.h (call_signal_handler_now): Remove obsolete declaration.
This commit is contained in:
@@ -349,17 +349,22 @@ extern "C" int
|
||||
sigaction (int sig, const struct sigaction *newact, struct sigaction *oldact)
|
||||
{
|
||||
sig_dispatch_pending ();
|
||||
sigproc_printf ("signal %d, newact %p, oldact %p", sig, newact, oldact);
|
||||
/* check that sig is in right range */
|
||||
if (sig < 0 || sig >= NSIG)
|
||||
{
|
||||
set_errno (EINVAL);
|
||||
sigproc_printf ("signal %d, newact %p, oldact %p", sig, newact, oldact);
|
||||
syscall_printf ("SIG_ERR = sigaction signal %d out of range", sig);
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct sigaction oa = global_sigs[sig];
|
||||
|
||||
if (newact)
|
||||
sigproc_printf ("signal %d, newact %p (handler %p), oa %p", sig, newact, newact->sa_handler, oa, oa.sa_handler);
|
||||
else
|
||||
sigproc_printf ("signal %d, newact %p, oa %p", sig, newact, oa, oa.sa_handler);
|
||||
|
||||
if (newact)
|
||||
{
|
||||
if (sig == SIGKILL || sig == SIGSTOP)
|
||||
|
Reference in New Issue
Block a user