Re: Requesting help on using g_threads with clone()

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

 



On Tue, May 10, 2011 at 6:50 PM, Venkateswararao Jujjuri
<jvrao@xxxxxxxxxxxxxxxxxx> wrote:

 [ ... stuff .. ]

it appears to me that you're completely confused about the
relationship between threads and processes.

the chroot(2) call changes the root dir for the entire process. there
is almost never a reason for a program to use clone(2) - it exists to
implement other things like fork() and pthreads. unless you are doing
something very esoteric, do not call clone(2).

you should be calling fork(2) to create a new process. you need to
read standard books on unix programming or stuff online that describe
the "double fork" trick to create demons correctly.

you don't demonize threads, you demonize a process, and demonize
really just means (a) its not running in the foregound (b) it won't
exit when its parent exits. double forking accomplishes this without
creating zombies (and you can read up on that online too).

your problems are basic posix/unix programming issues and really have
nothing to do with gtk or glib.

--p
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux