Re: terminating lines with accidental eof

2006-07-05 Thread Paul Jarc
[EMAIL PROTECTED] (Martin Wheatley) wrote: > (ie commands are only executed when the user hits enter and NOT > executed when an I/O error occurs on the input stream). EOF is not an error. If there is an error, then certainly bash should not execute an partial command it has buffered, but that won

Re: terminating lines with accidental eof

2006-07-05 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Martin Wheatley on 7/5/2006 2:58 AM: > > Linking /bin/sh to /bin/bash does NOT maintain the bourne shell API. > > For example, > > Tradition using a traditional bourne shell ... > > xn-sysadm-4 $ sh > xn-sysadm-4 $ PWD=fred > xn-sysadm

Re: terminating lines with accidental eof

2006-07-05 Thread Martin Wheatley
Bob Proulx wrote: Please keep your replies to the mailing list to keep everyone involved in the discussion instead of singling out one individual. Also the mailing list is archived and others may search the archive to find previous discussions. Martin Wheatley wrote: The following can be us

Re: terminating lines with accidental eof

2006-07-05 Thread Martin Wheatley
Bob Proulx wrote: Martin Wheatley wrote: You also asked ... Is there an example of another command shell which handles this situation in a different and possibly better way? /bin/sh handles the situation correctly (in our opinion) On my system /bin/sh is a symlink to /bin/bash and beh

Re: terminating lines with accidental eof

2006-07-05 Thread Bob Proulx
Andreas Schwab wrote: > Bob Proulx writes: > > A small point. You are aware that the tty driver converts enter from > > the keyboard into a newline? See the tty driver 'icrnl' flag setting. > > Programs never read a carriage return. Programs actually read a > > newline character. > > Only in ic

Re: terminating lines with accidental eof

2006-07-05 Thread Andreas Schwab
[EMAIL PROTECTED] (Bob Proulx) writes: > A small point. You are aware that the tty driver converts enter from > the keyboard into a newline? See the tty driver 'icrnl' flag setting. > Programs never read a carriage return. Programs actually read a > newline character. Only in icanon mode, othe

Re: terminating lines with accidental eof

2006-07-04 Thread Bob Proulx
Martin Wheatley wrote: > You also asked ... > > > Is there an example of > > another command shell which handles this situation in a different and > > possibly better way? > > /bin/sh handles the situation correctly (in our opinion) On my system /bin/sh is a symlink to /bin/bash and behaves simi

Re: terminating lines with accidental eof

2006-07-04 Thread Bob Proulx
Please keep your replies to the mailing list to keep everyone involved in the discussion instead of singling out one individual. Also the mailing list is archived and others may search the archive to find previous discussions. Martin Wheatley wrote: > The following can be used to reproduce the pr

terminating lines with accidental eof (was: [50 character or so descriptive subject here (for reference)])

2006-06-29 Thread Bob Proulx
Martin Wheatley wrote: > Description: > Bash may inadvertently execute a command that the user did not > anticipate if STDIN is closed. The shell reads data from the input. It then parses the input into commands and executes them. If this is not what you want then you must avoid closing th