[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Forking from Gtk
- From: "Gabriele Greco" <gabriele greco darts it>
- To: "G Hasse" <gorhas raditex se>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Forking from Gtk
- Date: Tue, 8 Jul 2008 10:17:53 +0200
On Mon, Jul 7, 2008 at 11:03 PM, G Hasse <gorhas raditex se> 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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]