stdin/stdout and g_spawn_async_with_pipes()



The netserver of netperf4 can run as a child of inetd, which makes stdin/stdout the socket that was accepted by inetd.

When running as a standalone daemon, netserver simply forks() but does not exec() and "control_sock" is known in the child and that is used.

I'd like to start using g_spawn_async_with_pipes() (at least I think I do :), and have things be as if it was launched from inetd. However, from the API reference:

http://developer.gnome.org/doc/API/2.0/glib/glib-Spawning-Processes.html#g-spawn-async-with-pipes

I gather that the standard_input, _output and _error parameters are to have the parent receive that stuff from the child rather than have the parent set them for the child?

thanks,

rick jones



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]