🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16006

Re: log off/ application terminate

#16006
From: Ed Mulroy [TeamB]
Date: Wed, 04 Jun 2003 00:26
17 lines
1781 bytes
Here is a mean hack that you might try.

Write a function that takes no calling parameters and returns no value [void
funcname(void)] and use its name in a call to atexit  Set a static global to
some value (1 would work) and have the code that ends the watchdog clear it
to zero.  Have your function check that global and end the watchdog if the
global is non-zero.

This is based on the fact that atexit items seem to be reliably executed.
However the exception handling system and all destructors are taken apart
before that point, so make the code stop the watchdog and not do anything
fancy.

.  Ed

> Duane Hebert wrote in message
> news:3edcf095$3@newsgroups.borland.com...
Technical Details
Message-ID: <3edd3cdd@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3edccd80@newsgroups.borland.com> <3edcd422$1@newsgroups.borland.com> <3edcdbb6@newsgroups.borland.com> <3edcea6f$1@newsgroups.borland.com> <3edcf095$3@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,f4b8abe1a2fab575
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-06-03 17:36:05 PST
From: "Ed Mulroy [TeamB]" <ed@mulroyREMOVETHESECHARS.org>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3edccd80@newsgroups.borland.com> <3edcd422$1@newsgroups.borland.com> <3edcdbb6@newsgroups.borland.com> <3edcea6f$1@newsgroups.borland.com> <3edcf095$3@newsgroups.borland.com>
Subject: Re: log off/ application terminate
Date: Tue, 3 Jun 2003 20:26:48 -0400
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 206.228.162.48
Message-ID: <3edd3cdd@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054686429 206.228.162.48 (3 Jun 2003 17:27:09 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail