g_spawn_sync and child PID
- From: Allin Cottrell <cottrell wfu edu>
- To: gtk-app-devel-list gnome org
- Subject: g_spawn_sync and child PID
- Date: Sat, 15 Mar 2014 20:19:34 +0000 (GMT)
I'm reasonably familiar with the usage of both g_spawn_sync and
g_spawn_async, but recently I've found myself wanting to do domething that
seems to fall between the two and I can't quite work out how to do it.
Here's the task: I want to spawn an mpiexec process from my GTK app and,
assuming all goes well, wait for the result (in itself that's a case of
g_spawn_sync). But I also want to know the PID of mpiexec, so that I can
give the user the option of killing that process "prematurely" if it seems
to be going wrong. (This is based on the observation that an MPI_Bcast
call, for example, can hang at 100% CPU if one or more of the processes
launched by mpiexec bombs out at just the wrong moment.)
Any suggestions on how to achieve this using g_spawn* (or judgements on
whether it's even possible) would be gratefully received.
--
Allin Cottrell
Department of Economics
Wake Forest University, NC
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]