Re: XForms: forking a child

AMIT BHATNAGAR (amit@cs.dal.ca)
Wed, 27 May 1998 14:46:02 -0300 (ADT)

# To subscribers of the xforms list from AMIT BHATNAGAR <amit@cs.dal.ca> :

On Wed, 27 May 1998, Steve Lamont wrote:

> # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
>
> > Now.. if I fork off the program in main(), will my callbacks still be able
> > to work? It is the callbacks that send the appropriate string to the
> > program..
>
> Yes, if you confine the interaction between the program and XForms to
> only one process -- multiple processes trying to talk to the server
> over the same descriptor will cause the dreaded "Xlib async error".

Steve,
what I am trying to accomplish is to make a GUI for an existing
menu drivin program (which I -cannot- alter the source). Unfortunately ,
the program (called FOMS) has a series of screens that reuire the user to
input a LOAD of information in many fields.

I have designed the corresponding screens in Xforms and made the
appropriate fields (input objects). Now I begin the integration between
the two. What I had in mind was that I will simply pipe over the
information that is entered in my gui's input bxes to FOMS which would be
forked() by my gui application.

So basically, when the user leavs one of my input firleds on one
of my screens but hitting tab, it iwll send that string to stdout, which
will be dup2'd to be the pipe for FOMS.

I had in mind that I will fork off a child in main(), and then the
parent part of the code would simply be the rest of the initialization,
and fl_do_forms. Now the input field's callback(s) would send the string
over, and handle any output from FOMS.

I hope this makes sence.. I find this a very challenging project, and I
always take your suggestions, (and the rest of the mailing list) into
account.

_________________________________________________
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/