Chapter 5 - Process Management
This commit is contained in:
15
chp5/atexit.c
Normal file
15
chp5/atexit.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void out(void) {
|
||||
printf("atexit() succeeded!\n");
|
||||
}
|
||||
|
||||
|
||||
int main(void) {
|
||||
if (atexit(out)) {
|
||||
fprintf(stderr, "atexit() failed\n");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user