X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;ds=sidebyside;f=functions%2Fstdlib%2Fexit.c;h=969b795f7100fa92de5b503f225060c5de92493f;hb=2af1ca8cfb0375c80c1ca72ded9260280494c8e2;hp=520757d501bd04667ae2aa3380de297c0c0979c4;hpb=9776b3400080a53347b2d45de16617342d4c7794;p=pdclib diff --git a/functions/stdlib/exit.c b/functions/stdlib/exit.c index 520757d..969b795 100644 --- a/functions/stdlib/exit.c +++ b/functions/stdlib/exit.c @@ -12,6 +12,10 @@ #ifndef REGTEST +/* TODO - "except that a function is called after any previously registered + functions that had already been called at the time it was registered. +*/ + struct _PDCLIB_exitfunc_t * regstack = NULL; void exit( int status ) @@ -24,7 +28,6 @@ void exit( int status ) free( next ); next = regstack; } - /* TODO: Flush and close open streams. Remove tmpfile() files. */ _Exit( status ); } @@ -35,9 +38,8 @@ void exit( int status ) int main() { - int NO_TESTDRIVER = 0; BEGIN_TESTS; - TESTCASE( NO_TESTDRIVER ); + /* Unwinding of regstack tested in atexit(). */ return TEST_RESULTS; }