Re: [gtkmm] Trouble spawning a process



On Thu, 2003-12-18 at 02:04, Quan Nguyen wrote:
I'm new to GTK, and I am having trouble spawning a
process.  I'm getting this error "abnormal program
termination" when I use the following code.  Can
anyone tell me what I'm doing wrong? 

I'm using Windows with GTK 2.2.4.1  and GTKMM 2.2.8.1.
 Everything is installed correctly since I'm able to
compile GTKMM apps successfully.  I just want to be
able to fork processes in a cross-platform way using
GLIB.  The documentation for forking processes in GLIB
is sparse.

Quan

----------- below is code --------------

string filename="helloworld.exe",
path="D:\\Dev-Cpp\\projects\\";

  vector<string> filename_arg, env_arg;

  filename_arg.push_back(filename);
  env_arg.push_back(path);

  Glib::spawn_async_with_pipes("", filename_arg);
I think that you may want either
    Glib::spawn_async(path, filename_arg);
or
    Glib::spawn_async(path, filename_arg,Glib::SPAWN_SEARCH_PATH);

Not that I'd have anything to do with Windows programming .....

HTH,
Tassos

-- 
Beware of he who would deny you access to information, for in his
heart he dreams himself your master." 
	-- Commissioner Pravin Lal, Sid Meier's Alpha Centauri


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