Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Enable sub-second timeout in zsystem flock



On Mon, Jul 29, 2019 at 1:36 PM Cedric Ware
<cedric.ware__bml@xxxxxxxxxxxxxx> wrote:
>
> The attached patch (against zsh 5.7.1) modifies the bin_zsystem_flock()

In future, please either inline patches or attach them as text/plain
(e.g. with a ".txt" extension instead of ".patch").  Thanks!

> I kept the same function's logic of periodically retrying to acquire
> the lock in non-blocking mode.  However, there may be a better way to
> implement this timeout: set a timer such as setitimer(2) which sends
> a SIGALRM on timeout

Unfortunately that technique can't be used because ALRM is a signal
that the user is allowed to trap via the "trap" command or TRAPALRM
function, and which is controlled by the TMOUT variable which is also
user settable.



Messages sorted by: Reverse Date, Date, Thread, Author