summaryrefslogtreecommitdiff
path: root/manual/examples
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1992-10-20 00:27:46 +0000
committerRoland McGrath <roland@gnu.org>1992-10-20 00:27:46 +0000
commit8909ba1c125dfbd8f42eada9acd1b42549943a2f (patch)
tree3c6708664f4d92fa035ba0d68140fe4e57f3c69b /manual/examples
parent29d5b206a661d3c516f1942c85065b899c79894d (diff)
Initial revision
Diffstat (limited to 'manual/examples')
-rw-r--r--manual/examples/atexit.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/manual/examples/atexit.c b/manual/examples/atexit.c
new file mode 100644
index 0000000000..42bba71126
--- /dev/null
+++ b/manual/examples/atexit.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+bye (void)
+{
+ puts ("Goodbye, cruel world....");
+}
+
+int
+main (void)
+{
+ atexit (bye);
+ exit (EXIT_SUCCESS);
+}