Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Oct 2005 12:58:27 -0400 (EDT)
From:      Thomas David Rivers <rivers@dignus.com>
To:        freebsd-hackers@freebsd.org
Subject:   flock() returns EHOSTUNREACH on 5.3 with 4.5 NFS server
Message-ID:  <200510051658.j95GwRo35992@lakes.dignus.com>

next in thread | raw e-mail | index | archive | help

I'm applying flock() to a file that is on an NFS server.
The program calling flock() is built on a 4.5 system,
with the 4.5 libraries, etc...  

The NFS server is a 4.5-RELEASE system.  The program running on a 
4.5-release system doesn't display any problems.

But - when I run that same program on a 5.3-RELEASE system,
flock() returns with a -1 and sets errno to EHOSTUNREACH.

Of course, the code is checking for EEOPNOTSUPP, but it doesn't
expect to see EHOSTUNREACH from flock().  We changed it to set
errno to zero to make sure that simply wasn't a dangling value
in errno.

Any ideas about what could be going on?  Should flock() be
setting errno to EHOSTUNREACH?  And, as the file can be read,
I don't understand where the EHOSTUNREACH comes from (the host
is very reachable.)

	- Thanks! -
	- Dave Rivers -

--
rivers@dignus.com                        Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510051658.j95GwRo35992>