home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.aix:9420 comp.unix.questions:10774 comp.windows.x.motif:6028 comp.windows.x:16235
- Newsgroups: comp.unix.aix,comp.unix.questions,comp.windows.x.motif,comp.windows.x
- Path: sparky!uunet!munnari.oz.au!spool.mu.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!mouse
- From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
- Subject: Re: signal when window is destroyed
- Message-ID: <1992Sep6.062943.15263@thunder.mcrcim.mcgill.edu>
- Organization: McGill Research Centre for Intelligent Machines
- References: <3297@carroll1.cc.edu>
- Date: Sun, 6 Sep 92 06:29:43 GMT
- Lines: 36
-
- In article <3297@carroll1.cc.edu>, pwickman@cerebus.cc.edu (Paul J. Wickman) writes:
-
- > What (if any) signal type is sent when a window is destroyed to the
- > program running in it[?]
-
- Depends on what you mean by "the program running in it". It would also
- help if you were more precise about what "destroyed" means, though in
- this case I think I can probably guess. "running in it" is similarly
- vague.
-
- > The program is an xterm exec-ing another program
-
- You are probably thinking of "a window" from a user's perspective.
- From that point of view, destroying a window amounts to making a
- request of your window manager. When you do this, no signal in the
- technical UNIX sense is sent to the X client responsible for the
- window. Depending on the window manager and various other things, the
- client may see the connection go away, or it may receive a request to
- make its window disappear. In neither case, though, does the event
- take the form of a UNIX signal.
-
- However, your comment about xterm makes it sound as though "running in
- it" here does not refer to the X client, which would be xterm, but
- rather to some process running connected to the pseudo-terminal xterm
- has set up. In this case, what *should* happen is that the virtual
- terminal loses carrier, which usually generates a SIGHUP. Whether this
- actually happens, and if it does whether your program will see it,
- depends on many factors. Some systems don't seem to close down ptys
- correctly to begin with, at least not always. Even if the pty is shut
- down correctly, your program may be running in the background and hence
- not get the signal.
-
- der Mouse
-
- mouse@larry.mcrcim.mcgill.edu
-