Re: g_exec functions



On 20 Aug 2000, Havoc Pennington wrote:


> One of the facilities Owen suggested merging to glib from libgnome a
> while back was gnome_execute_async() etc. (see gnome-exec.[hc]).

An excellent idea.
 
> Some of the issues (in addition to the one Tom mentions):
>  - should error codes be simple equivalents of E* from the 
>    UNIX API as I have them, or some kind of friendlier/simpler
>    thing?

I prefer the E equiv.  That way there is no confusion wrt
losing meaning in the translation.  With the E equiv the debugging
developer, to whom the message will no doubt be of most import, will know
or can look up the exact message.

>  - the idea is that error->message would be nice and user friendly.
>    I believe glib doesn't use gettext right now, but it would have to
>    in order to contain error messages.

Maybe a combo.  ("%s\n%s", err_code[0], err_code[1])

>  - I don't have versions that add to the environment before
>    launching the child; are these really useful?

They are to me, but I'm special. :-)  Seriously, Oracle's client apps are
environment driven, so if I want different reactions from the software I
use different env settings.  Setting these in the same call as the exec
would be cool.

>  - I have two convenience functions; one sets up pipes to
>    stdin/stdout/stderr for an async child, and one blocks
>    waiting for child exit and returns stdout/stderr as strings.

Neat-o.  Where are they?  Put them in.

Matthew
Orasoft







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