help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Editing a running bash script can cause it fail?


From: Greg St . Louis
Subject: Re: [Help-bash] Editing a running bash script can cause it fail?
Date: Fri, 14 Jun 2013 11:30:14 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Chet Ramey <address@hidden> writes:

> 
> On 5/26/13 10:59 PM, Chris Down wrote:
> > I'm not totally sure how it happens or what the conditions for re-
reading
> > the script are, but it is known[1].
> > 
> > PS (to Chet, et al): is this documented in detail somewhere? This seems
> > like one of the few things that I've not been able to find functional
> > documentation on, whether in the bash manuals, or elsewhere.
> 
> It's not.  It's simply an implementation detail.
> 
> If you're interested, the code bash uses to read script files is in
> input.c.  Bash reads script files in 8K chunks, but seeks backward when
> forking children to set the file pointer to where the parser has read,
> so children don't see read-ahead.  When reading a script from the 
standard
> input, this is required.
> 
> Chet
> 

I'm not editing my script, but I am ejecting the DVD that I started it 
from in the middle of processing. Nonetheless, I'm seeing the same 
symptom - failure.

Can the bash behavior that's been described here account for my issue as 
well? If bash attempts to read from the script after it's started but the 
physical medium on which it exists has been detached, will I encounter 
issues?




reply via email to

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