Re: XForms: launching X applications

Steve Lamont (
Fri, 5 Sep 97 16:41:52 PDT

To subscribers of the xforms list from (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.

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