Changeset 4851:d46b432ae11a in roaraudio
- Timestamp:
- 04/09/11 22:08:18 (13 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
configure
r4798 r4851 1343 1343 test_lib_defmake ROAR_HAVE_H_FCNTL % fcntl.h c -- fcntl.h 1344 1344 test_lib_defmake ROAR_HAVE_H_UNISTD % unistd.h c -- unistd.h 1345 test_lib_defmake ROAR_HAVE_H_STDLIB % stdlib.h c -- stdlib.h 1345 1346 test_lib_defmake ROAR_HAVE_H_SIGNAL % signal.h c -- signal.h 1346 1347 test_lib_defmake ROAR_HAVE_H_POLL % poll.h c -- poll.h … … 1515 1516 test_func_defmake ROAR_HAVE_POPEN popen 'popen("", "")' -- stdio.h 1516 1517 test_func_defmake ROAR_HAVE_PCLOSE pclose 'pclose(0)' -- stdio.h 1518 test_func_defmake ROAR_HAVE_SYSTEM system 'system("")' -- stdlib.h 1517 1519 test_func_defmake ROAR_HAVE_GETSOCKNAME getsockname 'getsockname(0, 0, 0)' -- sys/socket.h 1518 1520 test_func_defmake ROAR_HAVE_GETPEERNAME getpeername 'getpeername(0, 0, 0)' -- sys/socket.h -
roard/include/roard.h
r4811 r4851 194 194 size_t jumbo_mtu; 195 195 int memlock_level; 196 #ifdef ROAR_HAVE_SYSTEM 197 struct { 198 const char * post_shutdown; 199 } scripts; 200 #endif 196 201 } * g_config; 197 202 -
roard/roard.c
r4848 r4851 189 189 " --log-syslog - Log Warnings, Errors, ... to syslog\n" 190 190 #endif 191 #ifdef ROAR_HAVE_SYSTEM 192 " --script-postdown S - Run command lion S after complet shutdown.\n" 193 #endif 191 194 ); 192 195 … … 476 479 477 480 g_config->memlock_level = -1; 481 482 #ifdef ROAR_HAVE_SYSTEM 483 g_config->scripts.post_shutdown = NULL; 484 #endif 478 485 479 486 return 0; … … 2042 2049 ROAR_ERR("--log-syslog not supported"); 2043 2050 #endif 2051 } else if ( strcmp(k, "--script-postdown") == 0 ) { 2052 _CKHAVEARGS(1); 2053 #ifdef ROAR_HAVE_SYSTEM 2054 g_config->scripts.post_shutdown = argv[++i]; 2055 #else 2056 ROAR_ERR("--script-postdown not supported"); 2057 i++; 2058 #endif 2044 2059 2045 2060 … … 2921 2936 roar_notify_core_free(NULL); 2922 2937 2938 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 2939 2940 if ( g_config->scripts.post_shutdown != NULL ) 2941 system(g_config->scripts.post_shutdown); 2942 2923 2943 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); 2924 2944 return 0; … … 3008 3028 roar_notify_core_free(NULL); 3009 3029 3030 ROAR_INFO("Shuting down complete", ROAR_DBG_INFO_INFO); 3031 3032 if ( g_config->scripts.post_shutdown != NULL ) 3033 system(g_config->scripts.post_shutdown); 3034 3010 3035 ROAR_INFO("Exiting, no error", ROAR_DBG_INFO_INFO); 3011 3036 exit(0);
Note: See TracChangeset
for help on using the changeset viewer.