19 lines
470 B
C++
19 lines
470 B
C++
#include "../src/SharedMemory.h"
|
|
#include <unistd.h>
|
|
#include <cstdlib>
|
|
#include <iostream>
|
|
#include <signal.h>
|
|
|
|
|
|
int main(int argc, char** argv)
|
|
{
|
|
sharedMemoryInit();
|
|
struct sigaction sigIntHandler;
|
|
sigIntHandler.sa_handler = deleteSharedMemory;
|
|
sigemptyset(&sigIntHandler.sa_mask);
|
|
sigIntHandler.sa_flags = 0;
|
|
sigaction(SIGINT, &sigIntHandler, NULL);
|
|
sleep(3); // TODO: warte auf eingabe
|
|
std::atexit(deleteSharedMemory);
|
|
return 0;
|
|
} |