Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15789 > unrolled thread

Re: bash problem

Started byChet Ramey <chet.ramey@case.edu>
First post2020-01-03 08:34 -0500
Last post2020-01-03 08:34 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: bash problem Chet Ramey <chet.ramey@case.edu> - 2020-01-03 08:34 -0500

#15789 — Re: bash problem

FromChet Ramey <chet.ramey@case.edu>
Date2020-01-03 08:34 -0500
SubjectRe: bash problem
Message-ID<mailman.1921.1578058467.1979.bug-bash@gnu.org>
On 1/2/20 8:45 AM, Wheatley, Martin R wrote:
> It appears that there may be an issue when bash terminates a shell as a result of TMOUT expiring.
> 
> I was attempting to enter "dc_command show media | grep YD" to the shell and this is the terminal output...
> 
> OLDuser@hostname $ dc_command show mediatimed out waiting for input: auto-logout
> NEWuser@hostname $  | grep YD
> -bash: syntax error near unexpected token `|'

I don't know what you have TMOUT set to, but it seems kind of small from
that example.


> If the command line had been something like " cd fred && rm -rf *"
> and the TMOUT had expired just after the '&&' had been entered then the "rm-rf *" would have been executed in the `cwd` of the parent process rather than in 'fred'

Yes. Since a child and its parent process share file descriptors (and file
pointers), terminal input not consumed by the child is available for the
parent.

> 
> It looks like the TMOUT isn't re-started after any shell input but only after a '\n' is seen.

That's how it's documented: TMOUT is the number of seconds to wait for "a
line of input after issuing the primary prompt." It issues the prompt and
waits for a complete line of input. That way it can work whether or not
you're using readline.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web