Changeset 1412:4768e3bf1c9b in freeDiameter
- Timestamp:
- Feb 18, 2020, 3:21:20 PM (4 years ago)
- Branch:
- default
- Phase:
- public
- committer:
- Luke Mewburn <luke@mewburn.net> 1582007266 -39600
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
freeDiameterd/main.c
r1411 r1412 155 155 ret = main_cmdline(argc, argv); 156 156 if (ret != 0) { 157 return ret;157 return EXIT_FAILURE; 158 158 } 159 159 160 160 if (daemon_mode) { 161 161 TRACE_DEBUG(INFO, "entering background mode"); 162 CHECK_SYS ( daemon(1, 0));163 } 164 165 CHECK_FCT ( pidfile_create());162 CHECK_SYS_DO( daemon(1, 0), return EXIT_FAILURE ); 163 } 164 165 CHECK_FCT_DO( pidfile_create(), return EXIT_FAILURE ); 166 166 167 167 /* Initialize the core library */ … … 169 169 if (ret != 0) { 170 170 fprintf(stderr, "An error occurred during freeDiameter core library initialization.\n"); 171 return ret;171 return EXIT_FAILURE; 172 172 } 173 173 … … 191 191 192 192 /* Now, just wait for termination */ 193 CHECK_FCT ( fd_core_wait_shutdown_complete());193 CHECK_FCT_DO( fd_core_wait_shutdown_complete(), return EXIT_FAILURE ); 194 194 195 195 /* Just in case it was not the result of a signal, we cancel signals_thr */ 196 196 fd_thr_term(&signals_thr); 197 197 198 return 0;198 return EXIT_SUCCESS; 199 199 error: 200 200 CHECK_FCT_DO( fd_core_shutdown(), ); 201 CHECK_FCT ( fd_core_wait_shutdown_complete());201 CHECK_FCT_DO( fd_core_wait_shutdown_complete(), return EXIT_FAILURE ); 202 202 fd_thr_term(&signals_thr); 203 return -1;203 return EXIT_FAILURE; 204 204 } 205 205 … … 277 277 case 'h': /* Print help and exit. */ 278 278 main_help(); 279 exit( 0);279 exit(EXIT_SUCCESS); 280 280 281 281 case 'V': /* Print version and exit. */ 282 282 main_version(); 283 exit( 0);283 exit(EXIT_SUCCESS); 284 284 285 285 case 'c': /* Read configuration from this file instead of the default location.. */
Note: See TracChangeset
for help on using the changeset viewer.