# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
> I'm trying to create an mpeg movie with "mpeg_encode", from flimage.
>
> I created a new process with fl_exe_command("mpeg_encode",FALSE)
> and i would like to dump my images in its "stdin"...
If all you want to do is to spawn a process and write to it, you don't
necessarily need to use fl_exe_command() or its ilk -- you can use
plain old popen() and pclose().
FILE *f;
f = popen( "myprocess", "w" );
fprintf( f, "hello there!\n" );
pclose( f );
Refer to your system's man pages for details.
If your process displays some sort of useful information to standard
output or standard error, you can use fl_oppen() and fl_pclose(),
which are XForms wrappers.
FILE *f;
fl_show_command_log( FL_FULLBORDER );
f = fl_popen( "myprocess", "w" );
fprintf( f, "hello xforms!\n" );
fl_pclose( f );
This is discussed in the Command Log section of the XForms manual.
[An aside to TC -- the LaTeX in that section is a bit garbled, at
least in my copy of the manual. Has it been fixed?]A
> I'm not very familiar with fork and this kind of stuff...
The Richard W. Stevens book _Advanced Programming in the UNIX
Environment_ is an excellent reference.
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 : Thu Mar 16 2000 - 09:46:13 EST