Re: gnome_show_url() hangs in threaded programs

On 2001.08.23 23:29 Pawel Salek wrote:
> On 2001.08.22 21:52 Pawel Salek wrote:
> > I have impression that something has got broken in gnome_show_url() and
> > related functions (or perhaps, a bug has surfaced that has not been
> > active earlier).
> After closer investigation, I think the problem is in gthread library. I
> attach a test program with does some threading and forking at the same
> time. 
> The program WorksForMe(TM) when compiled as follows:
> # cc atfork-test.c -lthread
> The program hangs when compiled as follows:
> # cc atfork-test.c -lgthread -lglib

cc atfork-test.c -lgthread-1.3 -lglib-1.3

hangs as well (-lgthread will link with version 1.2 of glib; I'm assuming
this is the common setup.)

Also, note:

1. If I replace exit(0) with _exit(0), the program will no longer hang
(like someone else suggested), but "atfork" functions do not appear to be
2. If I replace fork() etc. with system(<something>), everything appears to
work as expected, i.e. the atfork functions are called. I find this a bit
surprising, since I'm assuming system() does little else than fork(), then
exec..(<shell>, ...)

> /Pawel

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