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
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
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 t
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
[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
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
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
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
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"
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.
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.
> But
10 matches
Mail list logo