problem with gethostname() under 4.1

Jennifer Merrill jenny at baker.dartmouth.edu
Tue Jan 29 06:28:27 AEST 1991


No doubt you are going to think this is crazy, but we had the same problem
when we moved or code from a Vax running 4.3BSD to a 5810 running Ultrix
3.? (I can't remember which).

It turned out, in our case, that the problem was conflicting variables.  I
had a program with a global array called 'databases'.  I eventually found out
that the routine getsvc also has a variable called 'databases'.  (I found
this by doing a nm(1) on libc.a.)  As I filled in my array, I trashed
the getsvc's version of databases and eventually that system call failed.

I'm not familiar with the program nfswatch, but my suggestion would be
to do an nm on the binary and see if you find any conflicts.  Find out what
variables are used by gethostname (and the routines it calls) and then see
if you've got any of those in nfswatch.

Good luck!!

---
Jennifer K. Merrill      (Jennifer.Merrill at dartmouth.edu)
Library Computing Services
Dartmouth College

--
---
Jennifer K. Merrill      (Jennifer.Merrill at dartmouth.edu)
Library Computing Services
Dartmouth College



More information about the Comp.unix.ultrix mailing list