GtkFileChooser and select() interaction



I have an app with two threads, one runs the GUI, one receives network
data and uses a select() call to watch for data. The network thread
does not touch the GUI at all. My problem is that when I create a
dialog box with a GtkFileChooser in it, the select function returns
several times with errno == EINTR. On most machines I've tested this
on, the program correctly handles this behavior. Unfortunately, on a
few machines, select() crashes intead of returning EINTR (at least,
GDB reports the crash as having occured within select(), and I
compiled with -O0 when testing). Oddly, this only seems to happen the
first time I create the dialog box with glade_xml_new. After this,
select runs fine no matter how many times I create or close the dialog
box in question. Seems like some sort of initialization for
GtkFileChooser causes select() to be interrupted.

Any ideas why this would happen? How can I somehow "pre-initialize"
things before my first call to select() ?

If it helps, the only difference between the machines that crash and
the ones that return EINTR seems to be that the crashing ones are all
i686 kernels, while some of the others are i686 and some are x86_64.

-Jim



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