--- deliantra/server/common/utils.C 2007/01/01 13:31:46 1.35 +++ deliantra/server/common/utils.C 2007/01/15 02:42:15 1.38 @@ -1,6 +1,7 @@ /* CrossFire, A Multiplayer game for X-windows + Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team Copyright (C) 2002 Mark Wedel & Crossfire Development Team Copyright (C) 1992 Frank Tore Johansen @@ -25,12 +26,17 @@ * General convenience functions for crossfire. */ +#include +#include +#include +#include +#include +#include + #include #include #include -#include -#include #include /* @@ -545,6 +551,18 @@ ///////////////////////////////////////////////////////////////////////////// +void +fork_abort (const char *msg) +{ + if (!fork ()) + { + signal (SIGABRT, SIG_DFL); + abort (); + } + + LOG (llevError, "fork abort: %s\n", msg); +} + void *salloc_ (int n) throw (std::bad_alloc) { void *ptr = g_slice_alloc (n);