Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > Re: Catching ex...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 10 Topic 45813 of 46738
Post > Topic >>

Re: Catching exit code before program termination

by Sam <sam@[EMAIL PROTECTED] > May 8, 2008 at 11:34 AM

This is a MIME GnuPG-signed message.  If you see this text, it means that
your E-mail or Usenet software does not sup****t MIME signed messages.
The Internet standard for MIME PGP messages, RFC 2015, was published in
1996.
To open this message correctly you will need to install E-mail or Usenet
software that sup****ts modern Internet standards.

--=_mimegpg-commodore.email-scan.com-12333-1210264476-0001
Content-Type: text/plain; format=flowed; charset="US-ASCII"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

titanandrews writes:

> This is for Windows, but I am looking for a solution for UNIX/Linux.

TMK, POSIX does not provide a means for an atexit handler to receive the 
exit status parameter that was passed to exit().

If I feel especially motivated, I'd go take a peek at glibc sources, and
see 
what's going on, and if glibc gives you a mechanism for this. Given that 
your question concerns Linux, you should acquire the habit of grabbing the

sources and looking at these kinds of things yourself, if you want to know

how they work. I understand that, coming from the Windows noosphere, this 
may be an exotic experience. But, the answer to these kinds of questions
can 
be located much faster just by looking at the corresponding source code, 
rather than waiting for someone to respond on a Usenet group.

> Use case: Imagine you have a library and you want to check if someone
> is calling exit with a particular code.

A shared library on Linux can be unloaded by the running process. The 
library gets unloaded, and the process continues to run (without the
benefit 
of the library's functionality, of course). If your code requires this,
it's 
time for you to redesign whatever you're trying to design.


--=_mimegpg-commodore.email-scan.com-12333-1210264476-0001
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQBIIyucx9p3GYHlUOIRAkxUAJ4/VpibwEgIOqsi9TsfPLyDkB9v9ACfW8DQ
ZHb0Y7K8gzX9vGBHeX/HEGU=
=9d10
-----END PGP SIGNATURE-----

--=_mimegpg-commodore.email-scan.com-12333-1210264476-0001--
 




 10 Posts in Topic:
Catching exit code before program termination
titanandrews <titanand  2008-05-08 09:05:09 
Re: Catching exit code before program termination
Sam <sam@[EMAIL PROTEC  2008-05-08 11:34:36 
Re: Catching exit code before program termination
Sam <sam@[EMAIL PROTEC  2008-05-08 11:44:26 
Re: Catching exit code before program termination
Martin York <Martin.Yo  2008-05-08 11:30:47 
Re: Catching exit code before program termination
titanandrews <titanand  2008-05-08 12:47:53 
Re: Catching exit code before program termination
Rolf Magnus <ramagnus@  2008-05-08 23:28:02 
Re: Catching exit code before program termination
Joe Greer <jgreer@[EMA  2008-05-08 22:15:22 
Re: Catching exit code before program termination
titanandrews <titanand  2008-05-08 17:36:08 
Re: Catching exit code before program termination
Jerry Coffin <jcoffin@  2008-05-10 22:29:34 
Re: Catching exit code before program termination
kasthurirangan.balaji@[EM  2008-05-08 22:08:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 0:05:35 CDT 2008.