Bill Caroselli wrote:
Derek Leach <> dleach@node318.ott.qnx.com> > wrote:
Tobias Moeglich <> Tobias.Moeglich@web.de> > wrote:
ed1k wrote:
In article <b6aage$j5p$> 1@inn.qnx.com> >, > nnamdi.kohn@tu-bs.de > says…
[snip]
Tobi.
(I’m concerned with this problem as well as Nnamdi)
I have not tried this so I don’t know if it will do what you want.
But look at PtTerminal & PtTty widgets. See if you can use one of
them and then re-direct your programs stdout to the file descriptor
associated with this widget.
That works fine. Thanks for Your advice. In the mean time I found out
myself. I toke an example code fro the help (can be seen below).
One more questions:
Is there a possibility to start a fixed application from this window?
I don’t want to always type the path and the executable file.
I suppose there must be a solution for this.
I suppose: “Pt_ARG_TTY_CMD” or “Pt_ARG_TTY_ARGV” or “Pt_ARG_TTY_PATH”
has to do with it.
Regards Tobias.
/* Open a pseudo tty – NULL is a shortcut for “/dev”;
- the widget will add something like “ttyp3” to it
*/
PtSetArg( &arg, Pt_ARG_TTY_PSEUDO, NULL, 0 );
PtSetResources( ABW_observ_Tty, 1, &arg );
PtSetArg( &arg, Pt_ARG_TTY_SFD, 0, 0 );
PtGetResources( ABW_observ_Tty, 1, &arg );
// Run a program on the pseudo tty. NULL is more or less a shortcut for
// “char *argv[] = { “/bin/sh”, NULL };” ,except it runs your shell
// rather than always /bin/sh.
PtSetArg( &arg, Pt_ARG_TTY_ARGV, NULL, 0 );
PtSetResources( ABW_observ_Tty, 1, &arg );
PtSetArg( &arg, Pt_ARG_TTY_PID, NULL, 0 );
PtGetResources( ABW_observ_Tty, 1, &arg );