This developer function is useful for debugging unusual error
conditions
}
+#ifdef DEVELOPER
+/* used when you want a debugger started at a particular point in the
+ code. Mostly useful in code that runs as a child process, where
+ normal gdb attach is harder to organise.
+*/
+void samba_start_debugger(void)
+{
+ char *cmd = NULL;
+ asprintf(&cmd, "xterm -e \"gdb --pid %u\"&", getpid());
+ system(cmd);
+ free(cmd);
+ sleep(2);
+}
+#endif
const char * const *argv0, ...);
int samba_runcmd_recv(struct tevent_req *req, int *perrno);
+#ifdef DEVELOPER
+void samba_start_debugger(void);
+#endif
+
#endif /* _SAMBA_UTIL_H_ */