Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is wait not interruptable?
- X-seq: zsh-workers 23068
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: Is wait not interruptable?
- Date: Mon, 18 Dec 2006 08:37:17 -0800
- In-reply-to: <20061218161229.7bbec427.pws@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200612171600.kBHG0IXv005533@xxxxxxxxxxxxxxxxx> <061217095424.ZM2103@xxxxxxxxxxxxxxxxxxxxxx> <20061218113953.c19237da.pws@xxxxxxx> <20061218161229.7bbec427.pws@xxxxxxx>
On Dec 18, 4:12pm, Peter Stephenson wrote:
}
} As I noted in a comment, there's presumably a race when queuing traps since
} the signal may already have been delivered by the time we start the trap
} queuing. That's not new (we only queue traps at roughly the point where we
} previously blocked signals). I could move the new queue_traps() before
} dont_queue_signals() in the two applicable functions: then traps would be
} queued when the previously blocked signals arrive.
As long as it's "safe" (in terms of shell function re-entrancy) and not
semantically incorrect for traps to be executed at that point, I think
what you have is fine.
Note that the important thing through this whole section is that
last_signal is sane, so that we don't end up waiting for the wrong
child if both a SIGCHLD and some other signal arrive during the
signal_suspend(). (I may be missing a detail that makes that comment
irrelevant.)
} One slight difference is that in zwaitjob() we'll delay traps to wait
} for the entire foreground job, not just the first process to exit.
Is that affected by TRAPS_ASYNC?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author