🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sgi.bugs
Article #44

C++ atexit() doesn't work

#44
From: Harold Zatz
Date: Mon, 04 Jan 1993 22:17
28 lines
983 bytes
On an Elan R4000, running 4.0.5F, with a version of the C++ library
that looks like:
krazy % ll /usr/lib/libC.a
-r--r--r--   1 root     wheel     161188 Oct  2 19:48 /usr/lib/libC.a

atexit() doesn't work with C++. Try this program:
-----test.c-----
#include <stdlib.h>
#include <stdio.h>

void doMe() {
    fprintf( stderr, "atexit() works!\n" );
    }

main() {
    atexit( doMe );
    exit( 0 );
    }
-------
krazy % cc -o test test.c
krazy % test
atexit() works!
krazy % CC -o test test.c
krazy % test

	Fixes? Workarounds? Anyone?

	--Harold Zatz
Technical Details
Message-ID: <1iad1lINNnn7@gap.caltech.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!hzatz

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!news.claremont.edu!nntp-server.caltech.edu!hzatz
From: hzatz@cco.caltech.edu (Harold Zatz)
Newsgroups: comp.sys.sgi.bugs
Subject: C++ atexit() doesn't work
Date: 4 Jan 1993 22:17:25 GMT
Organization: Rhythm & Hues, Inc.
Lines: 28
Sender: Harold Zatz (hzatz@rhythm.com)
Distribution: world
Message-ID: <1iad1lINNnn7@gap.caltech.edu>
NNTP-Posting-Host: alumni.caltech.edu