Re: Spawn a process without exec



John Cuppit wrote:
sounds like you want to start a child thread:

  http://developer.gnome.org/doc/API/2.0/glib/glib-Threads.html

Uhrgh! I dreaded something like that. It's (always) time to learn...

there are some 'gotchas' if you have several threads all calling the
same GTK. It's usually best (IMO) to have all of the GTK calls in one
thread and to use something like an asyncqueue for workers to tell the
GUI thread what to do.

At the moment I know almost nothing about glib threads, but after
taking a first look at the API reference I couldn't find any way to
"kill" a thread from the main thread, which is what I want to do.
There's g_thread_exit(), but it exits the current thread, and
g_thread_join() waits for the thread to exit by itself...


David

On Thu, 19 Aug 2004 22:32:15 +0000, David Rosal <davidrr menta net> wrote:
 > Please, could anybody tell me how to create a non-exec process within a
 > GTK application?
 > I can't use fork() because the child has to use GTK, and the g_spawn...
 > stuff is only used to spawn processes that run a different program with
 > exec.





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