Changeset 5619:16fe78ec277c in roaraudio for roard
- Timestamp:
- 08/09/12 00:01:15 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/lib.c
r5586 r5619 34 34 ROAR_WARN("lib_run_bg(cmd='%s', ...): This function should never be called. Contact devels."); 35 35 36 child = fork();36 child = roar_fork(NULL); 37 37 38 38 if ( child == -1 ) { … … 47 47 48 48 // we are the child. 49 // first we need to close a lot of open files! 49 50 // first stop the watchdog. 51 roar_watchdog_stop(); 52 53 // then we need to close a lot of open files! 50 54 51 55 // before we do this we need to keep backups of our handles: -
roard/loop.c
r5586 r5619 62 62 63 63 ROAR_DBG("main_loop(*): looping..."); 64 65 roar_watchdog_trigger(); 64 66 65 67 #ifdef ROAR_SUPPORT_LISTEN -
roard/roard.c
r5592 r5619 224 224 " give multible times for being more realtime\n" 225 225 " --memlock LEVEL - Set default memory locking level to LEVEL\n" 226 " --watchdog - Enable watchdog\n" 227 " --watchdog-time TIME - Set watchdog time to TIME (in ms)\n" 226 228 #ifdef ROAR_HAVE_CHROOT 227 229 " --chroot DIR - chroots to the given dir\n" … … 1428 1430 int daemon = 0; 1429 1431 #endif 1432 int_least32_t watchdog_time = 0; // -1: default, 0: disabled, > 0: user set time. 1430 1433 int realtime = 0; 1431 1434 int sysclocksync = 0; … … 1700 1703 _CKHAVEARGS(1); 1701 1704 g_config->memlock_level = memlock_str2level(argv[++i]); 1705 } else if ( strcmp(k, "--watchdog") == 0 ) { 1706 if ( watchdog_time == 0 ) 1707 watchdog_time = -1; 1708 } else if ( strcmp(k, "--watchdog-time") == 0 ) { 1709 _CKHAVEARGS(1); 1710 watchdog_time = atoi(argv[++i]); 1702 1711 } else if ( strcmp(k, "--chroot") == 0 ) { 1703 1712 _CKHAVEARGS(1); … … 2581 2590 close(ROAR_STDERR); 2582 2591 2583 if ( fork() )2592 if ( roar_fork(NULL) ) 2584 2593 ROAR_U_EXIT(0); 2585 2594 … … 2591 2600 } 2592 2601 #endif 2602 2603 if ( watchdog_time ) { 2604 if ( watchdog_time == -1 ) 2605 watchdog_time = 5000; 2606 roar_watchdog_start(ROAR_WATCHDOG_CONF_DEFAULTS, watchdog_time, NULL); 2607 } 2593 2608 2594 2609 #if defined(ROAR_HAVE_SETUID) && defined(ROAR_HAVE_IO_POSIX)
Note: See TracChangeset
for help on using the changeset viewer.