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:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user