summaryrefslogtreecommitdiff
path: root/source3/nmbd/asyncdns.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-03-03 20:19:14 +0000
committerJeremy Allison <jra@samba.org>1998-03-03 20:19:14 +0000
commitb7fb6c6b38784d25c9c85e9b27b08e30111dbd0c (patch)
treeff98efd1c5b4f92782b9687791a321037e2f9e6d /source3/nmbd/asyncdns.c
parentf0e121d100ef207b683fbb8d3079403e22929d0a (diff)
downloadsamba-b7fb6c6b38784d25c9c85e9b27b08e30111dbd0c.tar.gz
samba-b7fb6c6b38784d25c9c85e9b27b08e30111dbd0c.tar.bz2
samba-b7fb6c6b38784d25c9c85e9b27b08e30111dbd0c.zip
Change the multibyte character set support so that
Kanji support is one case of multibyte character support, rather than being a specific case in single byte character support. This allows us to add Big5 Chinese support (code page 950) and Korean Hangul support (code page 949) at very little cost. Also allows us to easily add future multibyte code pages. Makefile: Added codepages 949, 950 as we now support more multibyte codepages. asyncdns.c: Fixed problem with child being re-spawned when parent killed. charcnv.c charset.c client.c clitar.c kanji.c kanji.h smb.h util.c loadparm.c: Generic multibyte codepage support (adding Big5 Chinese and Korean Hangul). nmbd.c: Fixed problem with child being re-spawned when parent killed. mangle.c: Modified str_checksum so that first 15 characters have more effect on outcome. This helps with short name mangling as most 'long' names are still shorter than 15 chars (bug was foobar_mng and foobar_sum would hash to the same value, with the modified code they hash differently. Jeremy. (This used to be commit 299016338cfb47f0c585875ef9b468121fcee97d)
Diffstat (limited to 'source3/nmbd/asyncdns.c')
-rw-r--r--source3/nmbd/asyncdns.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c
index 3b71369d67..3fb16a08e9 100644
--- a/source3/nmbd/asyncdns.c
+++ b/source3/nmbd/asyncdns.c
@@ -103,7 +103,8 @@ static void asyncdns_process(void)
}
/**************************************************************************** **
- catch a sigterm
+ catch a sigterm (in the child process - the parent has a different handler
+ see nmbd.c for details).
We need a separate term handler here so we don't release any
names that our parent is going to release, or overwrite a
WINS db that our parent is going to write.
@@ -117,6 +118,17 @@ static int sig_term()
}
/***************************************************************************
+ Called by the parent process when it receives a SIGTERM - also kills the
+ child so we don't get child async dns processes lying around, causing trouble.
+ ****************************************************************************/
+
+void kill_async_dns_child()
+{
+ if(child_pid != 0 && child_pid != -1)
+ kill(child_pid, SIGTERM);
+}
+
+/***************************************************************************
create a child process to handle DNS lookups
****************************************************************************/
void start_async_dns(void)
@@ -326,4 +338,12 @@ BOOL queue_dns_query(struct packet_struct *p,struct nmb_name *question,
send_wins_name_query_response(0, p, *n);
return False;
}
+
+/***************************************************************************
+ With sync dns there is no child to kill on SIGTERM.
+ ****************************************************************************/
+void kill_async_dns_child()
+{
+ return;
+}
#endif