[Top][All Lists]

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

Re: bash: no job control in this shell

From: JimK
Subject: Re: bash: no job control in this shell
Date: Tue, 10 Jul 2007 09:10:38 -0700 (PDT)

Chet Ramey wrote:
> JimK wrote:
>>> I have written a java applet to interact with bash in the background to
>>> let
>>> the applet user interact just like they were using bash itself.
>>> But when the initial output from bash comes to my applet, it says "bash:
>>> no
>>> job control in this shell". 
>>In general, this happens when bash thinks it's interactive but can't
>>obtain a handle to the controlling terminal that allows it to manipulate
>>the controlling terminal's process group.  Since that's all job control
>>really is -- switching the terminal's process group between processes --
>>bash turns off job control if it's not available.
>>Other programs that attempt to put the terminal into "raw" mode usually
>>do it by trying to open "/dev/tty" (always the controlling terminal) and
>>change its attributes.  If that fails, they fall back to line-at-a-time
> I was reading up more on pseudo-terminals
> (https://www.linux.org/docs/ldp/howto/Text-Terminal-HOWTO-7.html) and it
> mentioned checking which tty is attached to which process, so in my applet
> I did a ps -eaf | grep bash and the bash my applet code starts up has
> pts/11 (the same tty the bash where I start the applet program has) and I
> did tty in the applet and it returned /dev/pts/8 which matches up with the
> slave name openpty() returns.
> I had also noticed that when I try to use 'less' in the applet, that I
> can't get out, so when I Ctrl-C to kill my code in the bash shell I
> started my applet from, the bash command line is now messed up. so I am
> *guessing* even tho the "applet" bash tty returns /dev/pts/8,  when in
> that applet bash I run the less command it is changing the attributes of
> pts/11, so the interaction in the "applet" bash is not set up as it should
> be, and my real bash window is now messed up ... plausible ?
> And if that is plausible, I guess the next question is there any way to
> use the slave name/tty to associate with the bash when I run it from my
> applet ...?
> Chet
> -- 
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                      Live Strong.  No day but today.
> Chet Ramey, ITS, CWRU    address@hidden   
> http://cnswww.cns.cwru.edu/~chet/
> _______________________________________________
> Bug-bash mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-bash

View this message in context: 
Sent from the Gnu - Bash mailing list archive at Nabble.com.

reply via email to

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