errno question

Richard A. O'Keefe ok at quintus.uucp
Wed Dec 14 21:55:00 AEST 1988


In article <704 at auspex.UUCP> guy at auspex.UUCP (Guy Harris) writes:
>>EDEADLK specifies a kernel deadlock condition; EDEADLOCK specifies
>>a file locking deadlock.
>
>Err, umm, the only place I could find EDEADLK used in the S5R3 or S5R3.1
>kernel is in the file-locking code, where it's used to indicate -
>surprise! - a file locking deadlock, and I couldn't find *any* uses of
>EDEADLOCK.  Unless there's some obscure POSIX-related stuff here, I
>think some code-slinger just got confused....

I was the one who asked the original question.
The background is that I was trying to write some code that handled some
errors, and found that not only was the set of 'errno' values different
from UNIX to UNIX, but that the same error in the same system call might
produce different 'errno' values from allegedly related UNIX ports.
(For example, compare the reaction to character codes 128..255 in file
names.)  This got me interested in errno.h generally, and I produced a
sort of Hexapla of errnos (actually an Octopla, but what the heck).  The
next step was to try to figure out what some of the newer errno values
mean.  And in S5R3 I came across
	#define EDEADLK    ~~~	{Deadlock condition}
	#define EDEADLOCK  ~~~  {File locking deadlock error}
Oh *PEST*.  I just noticed that on one of our V.3 systems the two
names are bound to different numbers, but on another they are bound
to the same number and both glossed as {Deadlock condition}.  SunOS
4.0 has only EDEADLK, glossed as {Deadlock condition}.  So it looks
as though EDEADLK is a V.3 thing, and EDEADLOCK is more recent than
that.  Presumably "some obscure POSIX-related stuff"...

Just for extra-special fun, Ultrix 2.0-1 defines EDEADLK as an alias
for EWOULDBLOCK and glosses it as {resource deadlock would occur}.
(The only mention of it is as a result of F_SETLK in fcntl(2).)

Gosh, this is more fun than kissing a cactus.



More information about the Comp.unix.questions mailing list