Re: Running Gtk application in new terminal



On Thu, 5 Jun 2014 16:08:07 +0000
"Mazer, Alan S (389M)" <Alan S Mazer jpl nasa gov> wrote:
Here you go.  This code implements a simple command processor, one
command of which starts up a gtk app.  I tried it with an app of mine
called "ngdcs" and it works.  You might want to read up on fork and
exec ("man fork", "man execv") but this does work for me:

Since the OP is using GTK+, it seems more logical to use
g_spawn_async() or g_spawn_async_with_pipes(), the latter of which will
also set up pipes for stdin, stdout and stderr for you.  (And they are
also cross-platform.)

https://developer.gnome.org/glib/2.40/glib-Spawning-Processes.html

Chris


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