Re: XForms: fl_exe_command dumper blues?

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 20 May 98 14:36:41 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> ... It has a number of timers for detecting
> online/offline events, idle timeouts, stats displays etc. Everything
> worked fine until I added code to abort the dialup operation if it
> hadn't managed to connect after 30 seconds. This code basically displays
> a dialog and then kills off the dialup process by using fl_exe_command
> (which is also used to start the dialup process in the first place). The
> fl_exe_command seems to cause the program to dump core about 50% of the
> time and/or complain about bad timer ids (this may give you a clue since
> the code executed at this point does nothing with any timers so its
> something internal to XForms). ...

Are you perchance calling fl_exe_command() from within a signal
handler? If you do this, you take the chance of interrupting some
XForms or Xlib function. Xlib, upon which XForms is built, is *not*
reentrant. This means that about the only safe thing to do in a
signal handler is to set a flag and return. Doing anything else,
especially invoking XForms functions, is the proverbial kiss of death.

If you're handling signals, you should use the
fl_add_signal_callback() function to register an handler. This
handler is safe and you can call anything you want from within it.
XForms will call it when a signal arrives.

Refer to the manual for details.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/