Re: XForms: Receiving data through pipe

Matthias Rarey (
Wed, 19 Nov 1997 17:41:30 +0100 (MET)

To subscribers of the xforms list from Matthias Rarey <> :


I have three application programs communicating via named pipes
with each other, two of them have an xforms gui and contain an
io_callback function. Everthing works without any problems on
SUN/SGI/Linux. My message handler looks like:

void parent_process_handler( int fd, void *data )
/* handling of input over the pipe from parent process */
{ char *routine = "parent_process_handler";
int i, n;
char msg[256], tmp_msg[256], *first;
char command, *part;
int objno, objid, switch_on, com_error;
vector cen;

command = receive_from_p( parproc, tmp_msg, 256 );
for( first = tmp_msg; *first == ' '; first++);
strcpy(msg, first);

com_error = FALSE;
{ case '.': /* last command */
case 'x': /* EXIT: parent enforces termination */

receive_from_p contains the read() command, the pipe is already open.

The main program contains

/* add parent process handler */
if( parproc )
fl_add_io_callback( parproc->fd_from_p, FL_READ, parent_process_handler,



To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: