Re: GLib Kill Process



Hi,

Using Win32 APIs: CreateProcess() for forking, WaitForSingleObject() for waiting, GetExitCodeProcess() for 
exit code and CloseHandle() for closing process's handle are quite easily than by using GLib's g_spawn* 
wrapper!.

               Ardhan


--- morshed nader gmail com wrote:

From: Nader Morshed <morshed nader gmail com>
To: gtk-app-devel-list gnome org
Subject: Re: GLib Kill Process
Date: Mon, 3 May 2010 15:24:28 -0700

As a note, using the built-in Windows function "TerminateProcess" ( 
http://msdn.microsoft.com/en-us/library/ms686714(VS.85).aspx ) fails with the error: "The handle is invalid", 
I don't have access to a POSIX environment to test kill() on though

On Mon, 3 May 2010 14:43:34 -0700
Nader Morshed <morshed nader gmail com> wrote:

Is there any way to kill a process in GLib, using the pid given by g_spawn_async()? I guess a fallback 
could be to use the GPid with the kill() function provided by signal.h, but that specific function has not 
yet been implemented on Windows through mingw :(

-- 
Nader Morshed <morshed nader gmail com>


-- 
Nader Morshed <morshed nader gmail com>
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




_____________________________________________________________
Listen to KNAC, Hit the Home page and Tune In Live! ---> http://www.knac.com



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