Re: cvs commit: src/sys/kern vfs_bio.c vfs_lock.c vfs_subr.c vfs
:-On [20050418 08:22], Matthew Dillon (dillon@apollo.backplane.com) wrote:
:> Well, throw the core file from the sigsegv onto leaf and I'll take
:> a look at it.
:
:Uploaded both cvs and cvs.core to my $HOME.
Bingo. the 'hostname' global is NULL. Now the question is why.
I recommend adding a couple of fprintf's to src/main.c in the contrib
code temporarily to test.
First, I recommend the patch below (as a test). If xgethostname()
is returning NULL then add debugging fprintf's to the xgethostname()
function until you track down the reason why.
-Matt
Matthew Dillon
<dillon@backplane.com>
:[21:59] [asmodai@purgatory] (526) {0} $ hostname
:purgatory.chronias.ninth-circle.org
:
:--
:Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
Index: main.c
===================================================================
RCS file: /cvs/src/contrib/cvs-1.12.11/src/main.c,v
retrieving revision 1.1
diff -u -r1.1 main.c
--- main.c 18 Dec 2004 21:54:14 -0000 1.1
+++ main.c 18 Apr 2005 18:10:28 -0000
@@ -801,7 +801,9 @@
/* make sure we clean up on error */
signals_register (main_cleanup);
+ fprintf(stderr, "getting hostname\n");
hostname = xgethostname();
+ fprintf(stderr, "got hostname: %p\n", hostname);
#ifdef SERVER_SUPPORT
/* Keep track of this separately since the client can change the
* hostname.
討論串 (同標題文章)
完整討論串 (本文為第 7 之 7 篇):