… | |
… | |
552 | ///////////////////////////////////////////////////////////////////////////// |
552 | ///////////////////////////////////////////////////////////////////////////// |
553 | |
553 | |
554 | void |
554 | void |
555 | fork_abort (const char *msg) |
555 | fork_abort (const char *msg) |
556 | { |
556 | { |
557 | LOG (llevError, "fork abort: %s\n", msg); |
|
|
558 | if (!fork ()) |
557 | if (!fork ()) |
559 | { |
558 | { |
560 | signal (SIGABRT, SIG_DFL); |
559 | signal (SIGABRT, SIG_DFL); |
561 | abort (); |
560 | abort (); |
562 | } |
561 | } |
563 | |
562 | |
|
|
563 | LOG (llevError, "fork abort: %s\n", msg); |
564 | } |
564 | } |
|
|
565 | |
565 | void *salloc_ (int n) throw (std::bad_alloc) |
566 | void *salloc_ (int n) throw (std::bad_alloc) |
566 | { |
567 | { |
567 | void *ptr = g_slice_alloc (n); |
568 | void *ptr = g_slice_alloc (n); |
568 | |
569 | |
569 | if (!ptr) |
570 | if (!ptr) |