https://bugzilla.novell.com/show_bug.cgi?id=430229
User sh@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=430229#c4
Stefan Hundhammer changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dmueller@novell.com, matz@novell.com
--- Comment #4 from Stefan Hundhammer 2008-09-30 04:11:45 MDT ---
Hm - isn't the log message self-evident?
2008-09-26 16:04:12 <3> linux-1ps9(14373) [ui] YUI.cc(~YUI):73
shutdownThreads() was never called!
2008-09-26 16:04:12 <3> linux-1ps9(14373) [ui] YUI.cc(~YUI):74 shutting down
now - this might segfault
i.e. the proper shutdown sequence of the UI was violated. This might work, or
it might segfault. In this particular case, it segfaulted.
fork() just copies the running process - with everything, including the UI, and
probably also with both its threads (Michael?): The YCP thread that listens to
the YCP (UI-) command stream and the UI thread that responds to X11 events
(mouse, keyboard, but also window redraw, window resize, etc.).
In other scenarios (in other SCR agents), system() works. system(), however,
also is just a fork() followed by exec(). So that combination seems to work.
If you don't exec(), but simply call your own code, at some point you call
exit(). That will also call C++ destructors, and this is where that error
message comes from: The YUI destructor is called. From there on, things go
downhill: It doesn't work as simply as that any more. There is a shutdown
sequence for the UI and its threads that must be obeyed.
Now, if fork() actually copies both threads (which it should IMHO), you could
simply call YUI::ui()->shutdownThreads() at some point to do a proper shutdown.
Another possibility would be to use a thread (a pthread), not a separate
process. This might be somewhat safer.
I recall Dirk Müller saying something about a GLIBC loop being differently in
our latest libqt4. Maybe there is a connection to this problem. Dirk?
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.