Re: XForms: Killing child whe window manager window closed is used

Eef Hartman (hartman@math.tudelft.nl)
Fri, 23 Jul 1999 09:26:41 +0200 (METDST)

# To subscribers of the xforms list from Eef Hartman <hartman@math.tudelft.nl> :

In a message to me Jeff PIerce wrote:
> Does anybody know what signal is sent to a running program when the
> upper right "close" square,"X", is triggered, fvwm-95?

Normal "SIGTERM" signal, that is: 15.

Note: the signal is send to the WINDOW (mostly xterm) and not to the
application unless the application IS the one that created the window.

> I am working on a simple mp3 player spawning xpg123 to do the playing.
> However, if you close the xforms window using the window manager button,
> the child does not get killed and continues to play.

You have to capture the signal yourself and send "SIGTERM" signals to
all active children. The window manager doesn't know about children when
they don't have "their own" windows.

> I have tried catching SIGINT, SIGKILL, SIGTERM. The proces are never

SIGKILL cannot be captured. It is the "kill absolutely" signal.
In the menu's, FVWM will have both Kill and Close (Destroy and Delete)
actions. The first is SIGKILL (9) and the other is SIGTERM (15).

-- 
    \     /   /
   /#. # #-  #  /
  ## ## ## ##  ##
 # #   ## ##  ##
" "  #    ## ##
"."  ".   "./
TTTTTTTTTT  UU      UU    Eef Hartman, System Administrator
    TT      UU      UU
    TT      UU      UU    Delft University of Technology
    TT      UU      UU    Mathematics (Applied Analysis) dept.
    TT      UU      UU    Mekelweg 4, P.O. Box 5031
    TT      UU      UU    2600 GA  Delft, The Netherlands
    TT       UU    UU     e-mail : E.J.M.Hartman@math.tudelft.nl
    TT        UUUUUU      fax    : +31-15-278 7209
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil   or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/