diff options
author | itohy <itohy> | 2000-07-26 03:40:53 +0000 |
---|---|---|
committer | itohy <itohy> | 2000-07-26 03:40:53 +0000 |
commit | 9d1584de1f5cfcebebd36c0f7edc9ba6ef945440 (patch) | |
tree | f0213ff556ef06c772ff20ce90973e1162324091 /japanese/skkserv | |
parent | 297580ca52faf7d8897eea1433f3238b055e190a (diff) | |
download | pkgsrc-9d1584de1f5cfcebebd36c0f7edc9ba6ef945440.tar.gz |
Print appropriate diagnosis on gethostbyname() failure, rather than dump core.
The result of gethostbyname() is used only for the host string returned by "3"
command, and the diagnosis is warning only.
The problem is reported by Yuji Yamano in PR #10676.
Diffstat (limited to 'japanese/skkserv')
-rw-r--r-- | japanese/skkserv/files/patch-sum | 4 | ||||
-rw-r--r-- | japanese/skkserv/patches/patch-af | 28 |
2 files changed, 25 insertions, 7 deletions
diff --git a/japanese/skkserv/files/patch-sum b/japanese/skkserv/files/patch-sum index 2b7d4c586a9..a06bcaa6e42 100644 --- a/japanese/skkserv/files/patch-sum +++ b/japanese/skkserv/files/patch-sum @@ -1,11 +1,11 @@ -$NetBSD: patch-sum,v 1.3 1999/12/27 23:21:21 itohy Exp $ +$NetBSD: patch-sum,v 1.4 2000/07/26 03:40:53 itohy Exp $ MD5 (patch-aa) = 4755129f92972489cb1f7bba2a7370f9 MD5 (patch-ab) = ea1b5133ffe3184d6a92735eb9f31f13 MD5 (patch-ac) = 35889fef05e7b4b7d12376c9e2ce5bba MD5 (patch-ad) = 5e4b28776c2bf7753dc095df10468b36 MD5 (patch-ae) = 126c617a8a4d630a9785aa639ede10f5 -MD5 (patch-af) = ff628b3980e6f0cdc9269215478c2526 +MD5 (patch-af) = 6e4d240675ee731c591c80599c332928 MD5 (patch-ag) = 264a703f7141e814998af34bf97bdeb1 MD5 (patch-bsearch) = ae90c6d2ed8f4e529f66f3cde3d2f60d MD5 (patch-jisyo) = 2b7d2df7a1c9ce3655410e37bd3f9ef5 diff --git a/japanese/skkserv/patches/patch-af b/japanese/skkserv/patches/patch-af index 5085219f185..8d3b7c936d5 100644 --- a/japanese/skkserv/patches/patch-af +++ b/japanese/skkserv/patches/patch-af @@ -1,7 +1,7 @@ -$NetBSD: patch-af,v 1.1.1.1 1999/12/24 03:19:23 itohy Exp $ +$NetBSD: patch-af,v 1.2 2000/07/26 03:40:54 itohy Exp $ --- skkserv/skkserv.c.orig Tue Jan 21 04:16:36 1997 -+++ skkserv/skkserv.c Tue Dec 21 15:50:59 1999 ++++ skkserv/skkserv.c Wed Jul 26 12:15:44 2000 @@ -132,6 +132,16 @@ int ctlterm; /* fildes for control terminal */ void reread(); @@ -31,11 +31,29 @@ $NetBSD: patch-af,v 1.1.1.1 1999/12/24 03:19:23 itohy Exp $ if ((ctlterm = open("/dev/tty", 2)) >= 0) { ioctl(ctlterm, TIOCNOTTY, 0); close(ctlterm); -@@ -214,6 +227,7 @@ - setpgrp(); +@@ -215,6 +228,7 @@ signal(SIGHUP, SIG_IGN); if (fork() != 0) exit(0); -+#endif #endif ++#endif } else { /* debug mode */ fprintf(errout, "SKK-JISYO is %s\n", jname); + fflush(errout); +@@ -724,6 +738,9 @@ + exit(1); + } + hentry = gethostbyname(hname); ++ if (hentry == NULL) { ++ fprintf(errout, "%s: WARNING: gethostbyname(%s) failed\n", pgmnm, hname); ++ } else { + #ifdef NO_ADDR_LIST + strcat(hname, ":"); + strcat(hname, hentry->h_addr); +@@ -736,6 +753,7 @@ + strcat(hname, inet_ntoa(*(struct in_addr *)*p++)); + } + #endif ++ } + strcat(hname, ": "); + } + |