packetgraph
packetgraph copied to clipboard
pg: simplify packegraph cleaning when receiving a signal.
When we receive a signal pg_stop(void); is not call, but the hugepages and bricks metafiles are still in the filesystem.
We need to find a better was to handle this problem. Solution may be to create a function that will call signal for you, or to use the destructor argument from gcc.
A solution would be to create a destructor using attribute((destructor)) and call pg_stop() by default. An option could be added to pg_init() to disable pg_stop() call during destructor.