On Mon, Jul 7, 2008 at 11:03 PM, G Hasse <[EMAIL PROTECTED]> wrote:

> Hello,
>
> I have a small demo app. This works on FreeBSD but I can't
> get to work on Linux. I know that in Linux setsid will fail
> if the child has the same session_id as the parent. So on
> Linux you must fork twice. But it also seems that the parent
> must do an exit. And I don't want that. The code is not very
> long - so I include it here.



I think you should avoid fork and use one of the functions glib provide to
spawn processes (
http://library.gnome.org/devel/glib/stable/glib-Spawning-Processes.html), or
a thread if you need to simply call a function.

In general using fork() in a GUI program is a bad idea.


-- 
Bye,
 Gabry
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to