Re: Edit vs delete a running script. Why difference?

2012-01-17 Thread Pierre Gaston
On Wed, Jan 18, 2012 at 6:19 AM, Teika Kazura wrote: > > Hi. When you edit a running bash script, it's affected, so you > shouldn't do that [1][2]. However, I heard[3] that if you delete the > script itself from the filesystem, the original is remembered by bash, > and it continues to run as-is (a

Re: minor bug in bash

2012-01-17 Thread Bob Proulx
Zachary Miller wrote: > If write() is interrupted by a signal after it successfully writes > some data, it shall return the number of bytes written. > > consider SIGSTOP, which is non-maskable. when the process continues, wouldn't > this be a situation where the write was interrupted and thus

Edit vs delete a running script. Why difference?

2012-01-17 Thread Teika Kazura
Hi. When you edit a running bash script, it's affected, so you shouldn't do that [1][2]. However, I heard[3] that if you delete the script itself from the filesystem, the original is remembered by bash, and it continues to run as-is (as-was?). It seems correct as far as I tried several times. What

Re: minor bug in bash

2012-01-17 Thread Zachary Miller
On Tue, Jan 17, 2012 at 10:18:00PM -0500, Chet Ramey wrote: > On 1/17/12 10:05 PM, Zachary Miller wrote: > >> Thanks for the report. As a practical matter, this doesn't present a > >> problem. When writing to a regular file, with no special flags supplied > >> to open(), the only cases Posix says

Re: minor bug in bash

2012-01-17 Thread Chet Ramey
On 1/17/12 10:05 PM, Zachary Miller wrote: >> Thanks for the report. As a practical matter, this doesn't present a >> problem. When writing to a regular file, with no special flags supplied >> to open(), the only cases Posix says it can return fewer bytes than >> specified are errors. > > thank

Re: minor bug in bash

2012-01-17 Thread Zachary Miller
> Thanks for the report. As a practical matter, this doesn't present a > problem. When writing to a regular file, with no special flags supplied > to open(), the only cases Posix says it can return fewer bytes than > specified are errors. thank chet. i figured that may be the case. if you woul

Re: minor bug in bash

2012-01-17 Thread Chet Ramey
On 1/17/12 7:04 PM, Zachary Miller wrote: > > hello, > > i would like to report a what i believe to be a minor bug in bash 4.2 that has > to do with file redirection: > > in redir.c:356 (function write_here_document()), this block of code: > if (write (fd, document, document_len) < documen

minor bug in bash

2012-01-17 Thread Zachary Miller
hello, i would like to report a what i believe to be a minor bug in bash 4.2 that has to do with file redirection: in redir.c:356 (function write_here_document()), this block of code: if (write (fd, document, document_len) < document_len) { if (errno == 0) err

Re: Default completion bug

2012-01-17 Thread Chet Ramey
On 1/16/12 3:54 PM, Sung Pae wrote: > The only issue then is that completing a bare `<`, `>` and `>>` results > in the default completion command receiving the redirection operator as > its first argument. The manual, however, states (my emphasis): > > For instance, assuming that there is a l