Avoids stopping the entire server just for debug dumps.
void *_oserver)
{
struct oserver *oserver = _oserver;
void *_oserver)
{
struct oserver *oserver = _oserver;
- FILE *f = fopen("/var/run/oserver/talloc.dump", "w");
- if (f) {
- talloc_report_full(oserver, f);
- fclose(f);
+ FILE *f;
+
+ /* Fork off a child for the report, so we aren't stopped. */
+ if (fork() == 0) {
+ f = fopen("/var/run/oserver/talloc.dump", "w");
+ if (f) {
+ talloc_report_full(oserver, f);
+ fclose(f);
+ }
+ _exit(0);