I am testing create&kill a process by *g_spawn_async_with_pipes()* in windows
Here is my code:
# argv is: ping xxx -t
GSpawnFlags flags = (GSpawnFlags)(G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH);
GError *error = NULL;
GPid pid;
gint stdio[3];
g_spawn_async_with_pipes(NULL, argv, NULL, flags, NULL, NULL,
&pid, &stdio[0], &stdio[1], &stdio[2], &error);
// ...# here i can read info from stdio[1]
g_spawn_close_pid(pid); # this does nothing
It doesn't works
I find that: the pid return by g_spawn_async_with_pipes != the pid in windows task management
How to kill the pid using C/C++?