Re: can't read open unix domain socket

Alan Cox (alan@cymru.net)
Thu, 4 Jul 1996 09:28:38 +0100 (BST)


> open("t", O_RDONLY) = 3
> fstat(3, {st_mode=S_IFSOCK|0755, st_size=0, ...}) = 0
> read(3, 0x8007000, 4096) = -1 ERRNO_22 (Invalid argument)
>
> I'm having trouble understanding exactly what's happening here, both from
> a philosophical, and from a mechanical viewpoint.

if t is a socket then someone has broken the file opening code. Open on
a socket should return an error. Its a wonder your machine didnt crash I
suspect.

Alan