Re: Question about g_spawn_sync/child_setup
- From: Tristan Van Berkom <vantr touchtunes com>
- To: "mike flyn org" <mike flyn org>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Question about g_spawn_sync/child_setup
- Date: Wed, 09 Jun 2004 11:58:59 -0400
mike flyn org wrote:
Hello everyone.
The g_spawn_sync provides a handy option of providing a setup function
(child_setup) that is executed by the child process before executing the
child's argument vector. However, child_setup returns void. Because of
this, there is now way to ensure the success of child_setup before executing
the argument vector.
I am interested in using child_setup to do some UID manipulation. However,
it is important to ensure that this manipulation does not fail before
executing anything. How may this be done? Why does child_setup not return a
gboolean that could then be checked by the g_spawn_sync function before
executing anything? I wish to avoid calling fork myself.
Regardless of whether this is a design flaw or not,
cant you simply `exit()' ?
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]