Changeset 10465 in ntrip for trunk/BNC/src/bncmain.cpp
- Timestamp:
- May 2, 2024, 9:41:10 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncmain.cpp
r10451 r10465 64 64 65 65 void catch_SIGINT(int) { 66 cout << " ProgramInterrupted by Ctrl-C" << endl;66 cout << "BNC Interrupted by Ctrl-C" << endl; 67 67 BNC_CORE->sigintReceived = 1; 68 68 BNC_CORE->stopPPP(); … … 76 76 } 77 77 78 void catch_SIGPIPE(int signum) { 79 cout << "Caught signal SIGPIPE " << signum << endl; 78 void catch_SIGTERM(int) { 79 cout << "BNC Terminated" << endl; 80 BNC_CORE->sigintReceived = 1; 81 BNC_CORE->stopPPP(); 82 BNC_CORE->stopCombination(); 83 #ifndef WIN32 84 sleep(2); 85 #else 86 Sleep(2000); 87 #endif 88 ::exit(0); 89 } 90 91 void catch_SIGHUP(int) { 92 cout << "BNC received SIGHUP signal: reload configuration" << endl; 93 bncSettings settings; 94 settings.reRead(); 95 BNC_CORE->caster()->readMountPoints(); 80 96 } 81 97 … … 449 465 } 450 466 451 452 453 #ifndef WIN32 454 signal(SIGPIPE, catch_SIGPIPE); 455 #endif 456 457 // Interactive Mode - open the main window 467 // Interactive Mode - open the main window 458 468 // ----------------------------------------- 459 469 if (interactive) { … … 512 522 513 523 signal(SIGINT, catch_SIGINT); 524 signal(SIGTERM, catch_SIGTERM); 525 signal(SIGHUP, catch_SIGHUP); 514 526 515 527 BNC_CORE->sigintReceived = 0; … … 552 564 caster->addGetThread(getThread, true); 553 565 } 566 554 567 } 555 568
Note:
See TracChangeset
for help on using the changeset viewer.