Re: XForms: launching X applications

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 5 Sep 97 16:41:52 PDT

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

> Weirdly, this does not work on my system. I can use a system() call with
> no problem but the fork() followed by an execl() does not work. My
> understanding is that execl() passes the **environ pointer on to the child
> process automatically so the xv application should no what DISPLAY to use.

Yes, this should be correct. execl() is basically a wrapper around
execve() on most systems.

Out of curiosity, even though it blocks, you might try the system()
call that another poster recommended, just to see if it fails in the
same manner.

Can you reduce the problem to a simple example?

It is remotely possible that the file descriptor connected to the
calling process's server isn't being closed automagically by the
system because it isn't opened with the close-on-exec flag set. You
might try forcefully closing the connection by getting the descriptor
with the ConnectionNumber() macro.

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/