Re: Running spawned program in background
- From: Dave Smith <davecindysmith comcast net>
- To: William Dest <ddinbox1-william yahoo com>, gtk-app-devel-list gnome org
- Subject: Re: Running spawned program in background
- Date: Mon, 26 Apr 2004 14:52:45 -0400
On Monday 26 April 2004 14:43, William Dest wrote:
I am using g_spawn_command_line_sync to run a shell
script in an xterm window. Of course, this runs as a
new process and leaves the GTK parent app unresponsive
and the screen elements don't get refreshed. It's a
little different from some of the previous threads
that discussed using gtk_events_pending, because it's
not a process I can put in a while loop that returns
occasionally after doing data crunching or something.
While the spawned program is running in a new
(non-GTK) window, I just want to be able to go back to
the GTK app and have it respond. Is there a way to
make some gtk_.. (or any) function call that will keep
the parent app active if it gets focus before the
child app closes?
Thanks,
William
William,
Have you tried g_spawn_command_line_async? According to the documentation,
the 'async' version of the command should run your script in the background.
Regards,
Dave
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]