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


Groups > gnu.bash.bug > #15789

Re: bash problem

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: bash problem
Date 2020-01-03 08:34 -0500
Organization ITS, Case Western Reserve University
Message-ID <mailman.1921.1578058467.1979.bug-bash@gnu.org> (permalink)
References <LOYP265MB1902BD6625252A65C2F6A5D88D200@LOYP265MB1902.GBRP265.PROD.OUTLOOK.COM> <fce0b821-0246-ca58-578a-5ffe7dc54124@case.edu>

Show all headers | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web