1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-26 04:23:49 +03:00

* added a debug thread id hook from jim myers

* change to select() from sys_select() in events.c, as sys_select() is
  not thread safe. We need a new unified signal handling scheme for
  Samba4, but for now just use select()
This commit is contained in:
Andrew Tridgell
-
parent f2d3dc9893
commit 126fcd4a76
3 changed files with 18 additions and 1 deletions

View File

@@ -57,6 +57,8 @@ void do_debug(const char *format, ...)
vasprintf(&s, format, ap);
va_end(ap);
log_task_id();
write(state.fd, s, strlen(s));
free(s);
}
@@ -147,6 +149,12 @@ uint32 get_task_id(void)
return getpid();
}
void log_task_id(void)
{
if (debug_handlers.ops.log_task_id) {
debug_handlers.ops.log_task_id(state.fd);
}
}
/*
register a set of debug handlers.
*/