diff options
author | Michael E Brown <michael_e_brown@dell.com> | 2007-12-11 14:56:19 -0600 |
---|---|---|
committer | Michael E Brown <michael_e_brown@dell.com> | 2007-12-11 15:07:50 -0600 |
commit | cbea8db466c868e0ee5d229827320395768dbd76 (patch) | |
tree | 8a0fa205a4322223790c4174c933aad981d4189b | |
parent | d296bcac544235a0539a01738cd4bfdb6fcddc8a (diff) | |
download | mock-cbea8db466c868e0ee5d229827320395768dbd76.tar.gz mock-cbea8db466c868e0ee5d229827320395768dbd76.tar.xz mock-cbea8db466c868e0ee5d229827320395768dbd76.zip |
add failsafe for daemontest.c such that it exits after 5 mins rather than hanging around forever.
-rw-r--r-- | docs/daemontest.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/daemontest.c b/docs/daemontest.c index f0e7393..5f63e7a 100644 --- a/docs/daemontest.c +++ b/docs/daemontest.c @@ -95,7 +95,9 @@ char str[10]; int main() { daemonize(); - while(1) sleep(1); /* run */ + // run for roughly 5 mins then exit. No need to stick around if unit test fails. + int i=0; + for( i=0; i<300; i++ ) sleep(1); } /* EOF */ |