mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-04 11:50:05 +02:00
WIP
This commit is contained in:
parent
dc78e23449
commit
5ce79ec9fa
@ -4,7 +4,6 @@
|
|||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "Receiver.h"
|
#include "Receiver.h"
|
||||||
#include "sls_detector_defs.h"
|
#include "sls_detector_defs.h"
|
||||||
#include "container_utils.h"
|
|
||||||
|
|
||||||
#include <csignal> //SIGINT
|
#include <csignal> //SIGINT
|
||||||
#include <cstdlib> //system
|
#include <cstdlib> //system
|
||||||
|
@ -213,8 +213,13 @@ int main(int argc, char *argv[]) {
|
|||||||
else if (pid == 0) {
|
else if (pid == 0) {
|
||||||
cprintf(BLUE,"Child process %d [ Tid: %ld ]\n", i, (long)syscall(SYS_gettid));
|
cprintf(BLUE,"Child process %d [ Tid: %ld ]\n", i, (long)syscall(SYS_gettid));
|
||||||
|
|
||||||
Receiver *receiver = new Receiver(startTCPPort + i);
|
std::unique_ptr<Receiver> receiver = nullptr;
|
||||||
|
try {
|
||||||
|
receiver = sls::make_unique<Receiver>(startTCPPort + i);
|
||||||
|
} catch (...) {
|
||||||
|
FILE_LOG(logINFOBLUE) << "Exiting Child Process [ Tid: " << syscall(SYS_gettid) << " ]";
|
||||||
|
throw;
|
||||||
|
}
|
||||||
/** - register callbacks. remember to set file write enable to 0 (using the client)
|
/** - register callbacks. remember to set file write enable to 0 (using the client)
|
||||||
if we should not write files and you will write data using the callbacks */
|
if we should not write files and you will write data using the callbacks */
|
||||||
if (withCallback) {
|
if (withCallback) {
|
||||||
@ -236,8 +241,6 @@ int main(int argc, char *argv[]) {
|
|||||||
/** - as long as keeprunning is true (changes with Ctrl+C) */
|
/** - as long as keeprunning is true (changes with Ctrl+C) */
|
||||||
while(keeprunning)
|
while(keeprunning)
|
||||||
pause();
|
pause();
|
||||||
/** - interrupt caught, delete Receiver object and exit */
|
|
||||||
delete receiver;
|
|
||||||
cprintf(BLUE,"Exiting Child Process [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
|
cprintf(BLUE,"Exiting Child Process [ Tid: %ld ]\n", (long)syscall(SYS_gettid));
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user