[comp.sys.sgi] Window Murder

karron@KARRON.MED.NYU.EDU (11/22/90)

I am sorry if I was not clear (seems pretty easy for me these days).

>In article <9011200320.AA26948@karron.med.nyu.edu> you write:
>>The solution should be that if you kill the last drawn window, in any order,
>>then the parent process should be killed, even if it does not have a window.

I think that parent is not the proper word to use. Primary might be better.
The process that created a window, and is connected to it for i/o. The window
is not a subprocess, but associated with the process. It is not a shell.
This is at the 'C' level, not the shell or ps level.

>
>Even if it is sh(1)?    Seems pretty dangerous and surprising.
>
>I'd be surprised if this was considered a good idea.....
>(disclaimer: I'm not involved directly in kernel stuff)
>

I was refering to windows created in a 'c' program via winopen("winname"),
and using a noport() call prior to creating the first window.
I was not refering to 4sight/news shell windows and the like.

In a multi window program, where all of the windows are run / associated
with a single process, I have noted this behavior of the kill icon.

If there is a single window associated with the process,then clicking on the
zap icon on the upper right hand corner of the window kills (sends a
SIGKILL signal) to the process controlling the window. The window is not
a separate process. If you have multiple windows, then the SIGKILL is not
sent unless you kill the first window created by the process, the wid of the
first winopen(); You can not kill the process by killing subwindows or secondary
windows. They process is not really a parent process, nothing is forked for
each new window after the initial winopen.

If there is NO primary window(not really parent window) because the main
program loop starts up with a noport() call, then you can not kill the
program, except from another shell window and doing an explicit kill or
killall.

I can send sample code of anyone really wants to see what I mean. A window
is worth a thousand words of description.

Cheers!

dan(jingled with jargon, jaded, and jinkxed)


+-----------------------------------------------------------------------------+
| karron@nyu.edu (mail alias that will always find me)                        |
|                                         Dan Karron                          |
| . . . . . . . . . . . . . .             New York University Medical Center  |
| 560 First Avenue           \ \    Pager <1> (212) 397 9330                  |
| New York, New York 10016    \**\        <2> 10896   <3> <your-number-here>  |
| (212) 340 5210               \**\__________________________________________ |
| Please Note : Soon to move to dan@karron.med.nyu.edu 128.122.135.3  (Nov 1 )|
+-----------------------------------------------------------------------------+

msc@ramoth.esd.sgi.com (Mark Callow) (11/27/90)

In article <9011220303.AA04608@karron.med.nyu.edu>, karron@KARRON.MED.NYU.EDU writes:
|> 
|> If there is a single window associated with the process,then clicking on the
|> zap icon on the upper right hand corner of the window kills (sends a
|> SIGKILL signal) to the process controlling the window. The window is not
|> a separate process. If you have multiple windows, then the SIGKILL is not
|> sent unless you kill the first window created by the process, the wid of the
|> first winopen(); You can not kill the process by killing subwindows or secondary
|> windows. They process is not really a parent process, nothing is forked for
|> each new window after the initial winopen.

Clicking the lightning bolt is equivalent to selecting "Close" from the window
frame menu.  "Close" does nothing unless you have queued WINSHUT.  In that
case your program receives a WINSHUT token in its queue after "Close" has
been selected.

When you select "Close" on the last remaining window of an application
(or the only window in a single window app.) it does the same thing as
"Quit".  "Quit" sends SIGKILL unless you have queued WINQUIT. In the latter
case your program receives a WINQUIT token.

|> 
|> If there is NO primary window(not really parent window) because the main
|> program loop starts up with a noport() call, then you can not kill the
|> program, except from another shell window and doing an explicit kill or
|> killall.

You can kill it by expressing interest in WINSHUT events (qdevice WINSHUT)
and then have your main loop can exit when it receives WINSHUT from your last
remaining visible window.

I don't know whether the problem with noport() windows and "Close" will be
fixed.  As I said in my earlier posting noport() is basically a hack.
-- 
From the TARDIS of Mark Callow
msc@ramoth.sgi.com, ...{ames,decwrl}!sgi!msc
"Spirits of genius are always opposed by mediocre minds" - Albert Einstein