For reference this is a patch to dctrl as supplied from original diald-0.16 + patch 5 Bumbling round my system the other day, I found dozens of "dctrl.XXXXX" littering the /tmp directory... Being one who hates litter, I started to investigate. The problem was that dctrl - as a simple wish app - doesn't trap the various Unix signals which shutting down the X server or the dctrl app involves. Even though it has a Quit option on its own menu which cleans up the rogue /tmp files, all other methods of quitting dctrl - such as a simple kill -TERM [pid] leave the file in place. My current fix is to use "wishx" from the Extended Tcl kit in place of "wish" as the windowing shell. This provides natural hooks for catching Unix signals. The start of dctrl thus becomes: #!/bin/sh # the next line restarts using wishx \ exec wishx "$0" "$@" and add a few further lines of Unix signal and Window Manager message trapping, as in: # Arrange to call an exit handler when the Window Manager requests shutdown. wm protocol . WM_DELETE_WINDOW dctrlQuit signal trap SIGTERM dctrlQuit signal trap SIGPIPE dctrlQuit signal trap SIGHUP dctrlQuit No ill effects so far, but no doubt this is a wildly simplistic answer to the problem of cleanly exiting dctrl at all times. Any further comments welcome. ( FYI , Extended Tcl and wishx are available in the "tclx" RPM in RedHat ) Ted Rule - To unsubscribe from this list: send the line "unsubscribe linux-diald" in the body of a message to [EMAIL PROTECTED]
