Re: [Fwd: Re: where is error? (Glib::spawn_async)]



On 11/2/06, Michael J M Thomson <mjmt internode on net> wrote:
> what makes you say that you don't need to pass the third parameter?
> the function expects a reference to an array here so you must pass it
> something.  Am I missing something?
>

No I probably wasn't clear, sorry. Just there are several overloads of
Glib::spawn_async(), one of which doesn't expect that argument:

Glib::spawn_async(const std::string& working_directory,
                   const Glib::ArrayHandle<std::string>& argv,
                   SpawnFlags flags = SpawnFlags(0),
                   const sigc::slot<void>& child_setup = sigc::slot<void>(),
                   Pid* child_pid = 0);

Kind of makes sense IMHO, if you consider vector<string>() as equivalent to
passing an empty array (char* env[1] = { NULL }) rather than NULL.

Ach.  Note to self: look for overloaded functions before declaring
something a bug.  Thanks for pointing that out.  Sorry for the
misinformation earlier.

--
jonner



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