# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
> > > I think i got a bug with fl_popen & fl_pclose functions.
> > >
> > > I spawn a process using popen ...
> > > I write to it some data
> > > I close the process using pclose
> > >
> > > Everything works fine...
> > >
> > > When i use fl_popen & fl_pclose instead of popen &pclose...the child
> > > process jams...
> [...]
> here are the only things i do :
>
> ...
> sprintf(s_buffer,"%s/bin/mpeg_encode -realquiet
> %s",GAIAHOME,_paramFile);
> _pw=fl_popen(s_buffer,"w");
I checked this out and the problem is that `mpeg_encode' never exits
-- it hangs waiting for more input on `stdin'. The standard pclose()
function closes the pipe connecting the parent process and the child.
However, XForms doesn't do this -- it just waits for the child process
to exit, which, of course, it never does.
I think in this case, at least for the meantime, you should use
popen() and pclose() as you have done, especially since you are
suppressing output from `mpeg_encode' anyhow.
TC, I think we need to fix/change fl_pclose() to forcibly close the
pipe and properly terminate. What say you?
spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
This archive was generated by hypermail 2b29 : Wed Mar 22 2000 - 12:20:57 EST