diff options
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. } } |