Re: bash: no job control in this shell

2007-07-11 Thread JimK
Chet Ramey wrote: > > >>You might want to look at examples/rlfe in the readline distribution. It >>does the same sort of front-end pty manipulation you;re interested in. > > Great tip, in there I found they do a setsid() and ioctl(...) and that > fixed the nojob control warning message AND l

Re: bash: no job control in this shell

2007-07-10 Thread Chet Ramey
JimK wrote: >> 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

Re: bash: no job control in this shell

2007-07-10 Thread JimK
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

Re: bash: no job control in this shell

2007-07-09 Thread JimK
Bob Proulx wrote: > > >>Internally bash will use the libc isatty(3) routine to determine if >>the input/output files are tty devices. In the shell these are >>available in the 'test' operator as the '-t' file operator. > >> $ test -t 0 && echo input is a tty >> $ test -t 1 && echo output is

Re: bash: no job control in this shell

2007-07-02 Thread Bob Proulx
[EMAIL PROTECTED] wrote: > Hi Bob, a quick question if I could as I am trying to determine if my bash > thinks it has a tty device or not and therefore is interactive or not. Internally bash will use the libc isatty(3) routine to determine if the input/output files are tty devices. In the shell

Re: bash: no job control in this shell

2007-06-29 Thread JimK
Bob Proulx wrote: > > >>Does this java applet set up a master-slave pty for bash's input and >>output? This is what the 'expect' program and similar usually do. > > Yep, I drop down into C to use openpty() to set up the master/slave and > pass the > file IDs back up into java.I Use input/out

Re: bash: no job control in this shell

2007-06-28 Thread Chet Ramey
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 g

Re: bash: no job control in this shell

2007-06-28 Thread Bob Proulx
Matthew Woehlke wrote: > Bob Proulx wrote: > >You would probably need "q\n" in order to get the data flushed to the > >subprocess. This is probably a stdio buffering issue. When the stdio > >library determines that the output is not a tty then the output is > >buffered into large blocks for perfo

Re: bash: no job control in this shell

2007-06-28 Thread Matthew Woehlke
Bob Proulx wrote: JimK wrote: Which initially I didn't think really mattered, but I just found out that man/less/more do not work after displaying their initial screen. Commands like "q" are not processed like they should so you are stuck inside of man/less/more. You would probably need "q\n"

Re: bash: no job control in this shell

2007-06-28 Thread Bob Proulx
nd similar usually do. > But when the initial output from bash comes to my applet, it says "bash: no > job control in this shell". When bash starts up it inspects the stdin (IIRC) and determines that it either is or is not a tty device. If a tty then it assumes it is running interactiv

bash: no job control in this shell

2007-06-28 Thread JimK
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". Which initially I didn't think