TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Stephan Zerth
from: Vitus Jensen
date: 1997-01-12 01:56:08
subject: OS/2 Shutdown

Moin Stephan,

06.01.97 20:19, you wrote a message to Paul Beverly:

 SZ> Paul Beverly{at}1:376/32 wrote in OS2PROG the following to all:

PB>> Does anyone know of a way for a program to capture the fact that a
PB>> SHUTDOWN has been initiated?
[...]

 SZ> I'm not sure, what your problem is, but if it's one of your _own_
 SZ> programs, you can do (nearly) everything you want, in an
 SZ> exitlist-function you registered with your program. IMHO, the
 SZ> registered list of exit-functions is _always_ executed, before a
 SZ> process really ends. Even in case of traps, etc Personally i use
 SZ> this mechanism in an distributed application to tell all other
 SZ> machines (via NETBios) that one of them has died...

What kind of a program was this application?  A VIO program I coded was
still running when this "shudown completed" box appeared.  I
added a thread to beep regularly to detect the moment of program exit and
it was still beeping (until I flipped the big red switch ;-).

 SZ> BTW: ShutDown will _never_ complete, until exitlist-processing of
 SZ> _all_ processes is complete.

This is certainly not true for VIO programs.  I switched to a PM program to
get a WM_CLOSE message and this is AFAIK the only possibility to detect a
shutdown.

I would, however, still prefer a solution for a VIO program and if you
managed to handle this please point out which way to go.

C-x C-s
    Vitus [Team OS/2 Germany #835]

---
* Origin: Milky Way, Earth, Germany, Niedersachen, Isernhagen (2:2474/400.8)
SEEN-BY: 50/99 54/99 270/101 620/243 625/0 160 711/401 409 410 413 430 808
SEEN-BY: 711/809 934 955 712/311 407 505 506 517 623 624 704 713/317 800/1
@PATH: 2474/400 0 24/999 888 396/1 270/101 712/624 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.