[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] bootstrap: add bootstrap_sync option.

From: Ralf Wildenhues
Subject: Re: [PATCH] bootstrap: add bootstrap_sync option.
Date: Mon, 15 Nov 2010 23:06:19 +0100
User-agent: Mutt/1.5.20 (2010-08-04)


* Paul Eggert wrote on Mon, Nov 15, 2010 at 07:30:55PM CET:
> One problem I forsee is that, if the script is modified in place,
> the modification can occur while the shell is reading the script.
> So one must first create the desired script as a separate file,
> and then atomically rename it over the original, so that the shell
> can continue to access the original script as needed via its
> already-open file descriptor.

Sounds like it won't work on w32, and likely not on NFS either.

> Even here, though,
> I worry that POSIX does not say that a shell must open a script and
> then access it only via a file descriptor: as far as I
> can see, it's valid (though admittedly weird) for a shell to reopen
> its script as needed, in which case the atomic-rename approach is
> not reliable either.


What might work is have bootstrap exec a temporary script that updates
bootstrap then exec's that again.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]