in reply to Re^2: GPS Widget
in thread GPS Widget

From my recollection, alarm won't work correctly in a thread on linux, the parent thread gets all the alarms. So you might be able to collect the SIG{ALRM} in the parent thread, and then send the signal to the thread. Or you may be able to find another workaround, like a separate timer thread, which times the gps sub.

Another workaround I've seen, is to eval a fork-&-exec in the thread, and you can get the alarm to work in the child pid. If I recall correctly...... :-)

Personnally I would use a separate timer thread, and use shared variables to somehow communicate and handle the timeout.


I'm not really a human, but I play one on earth. Cogito ergo sum a bum