aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test.c')
-rw-r--r--test.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/test.c b/test.c
index b7f9627..2a99d2b 100644
--- a/test.c
+++ b/test.c
@@ -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.
}
}