packetgraph icon indicating copy to clipboard operation
packetgraph copied to clipboard

pg: simplify packegraph cleaning when receiving a signal.

Open outscale-mgo opened this issue 9 years ago • 1 comments

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.

outscale-mgo avatar Jun 14 '16 15:06 outscale-mgo

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.

jerome-jutteau avatar Jun 14 '16 15:06 jerome-jutteau