diff options
author | cnlohr <lohr85@gmail.com> | 2016-11-30 02:10:28 -0500 |
---|---|---|
committer | cnlohr <lohr85@gmail.com> | 2016-11-30 02:10:28 -0500 |
commit | 1d0a3ef8b28e212eda4735da66f2f26e6c1a7cc5 (patch) | |
tree | 855a316ba979742543dd5122faaa80c7b50ba498 /test.c | |
parent | 8388ca81fbc6c0a840e81f6fd805b897d378556b (diff) | |
download | libsurvive-1d0a3ef8b28e212eda4735da66f2f26e6c1a7cc5.tar.gz libsurvive-1d0a3ef8b28e212eda4735da66f2f26e6c1a7cc5.tar.bz2 |
I'm learning.
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -1,12 +1,17 @@ #include <unistd.h> #include <stdio.h> - - +#include <stdlib.h> #include <survive.h> +void survivefault( struct SurviveContext * ctx, const char * fault ) +{ + fprintf( stderr, "Error: %s\n", fault ); + exit( -1 ); +} + int main() { - struct SurviveContext * ctx = survive_init( &ctx ); + struct SurviveContext * ctx = survive_init( &survivefault ); if( !ctx ) { @@ -16,7 +21,7 @@ int main() while(survive_poll(ctx) == 0) { - + //Do stuff. } } |