Re: XForms: an unrelated question...

Steve Lamont (spl@szechuan.ucsd.edu)
Mon, 1 Jun 98 15:19:42 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> why? Popen should take care of that for you...

If you want to communicate bidirectionally, I don't believe popen() will
do the job:

POPEN(3S) STANDARD I/O FUNCTIONS POPEN(3S)

NAME
popen, pclose - open or close a pipe (for I/O) from or to a
process

SYNOPSIS
#include <stdio.h>

FILE *popen(command, type)
char *command, *type;

pclose(stream)
FILE *stream;

DESCRIPTION
The arguments to popen() are pointers to null-terminated
strings containing, respectively, a shell command line and
an I/O mode, either r for reading or w for writing. [...]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It the application you're trying to control is really curses based,
you're going to have to become the controlling terminal, which is more
complicated than just redirecting standard input and output.

Again, the best reference for this is probably Stevens.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/