summaryrefslogtreecommitdiff
path: root/source4/lib/debug.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-04 09:52:14 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-04 09:52:14 +0000
commit2e5ae6f0650962db86fcdb1290f9a7c8b07b1410 (patch)
tree0bb87301b126dc2a0da21335a8de9ea8dc27ba28 /source4/lib/debug.c
parent926240428c0646aabb13539745940b61a7cf44a9 (diff)
downloadsamba-2e5ae6f0650962db86fcdb1290f9a7c8b07b1410.tar.gz
samba-2e5ae6f0650962db86fcdb1290f9a7c8b07b1410.tar.bz2
samba-2e5ae6f0650962db86fcdb1290f9a7c8b07b1410.zip
* 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 used to be commit 126fcd4a76ac029ee4f662ed41b84c791406c324)
Diffstat (limited to 'source4/lib/debug.c')
-rw-r--r--source4/lib/debug.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/debug.c b/source4/lib/debug.c
index 792cf14c5a..dbd3946c81 100644
--- a/source4/lib/debug.c
+++ b/source4/lib/debug.c
@@ -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.
*/