Plan 9 from Bell Labs’s /usr/web/sources/patch/ape-erik/atexit.c.orig

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include <unistd.h>
#define	NONEXIT	34
extern void (*_atexitfns[NONEXIT])(void);

int
atexit(void (*f)(void))
{
	int i;
	for(i=0; i<NONEXIT; i++)
		if(!_atexitfns[i]){
			_atexitfns[i] = f;
			return(0);
		}
	return(1);
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].