Bug#942558: hurd: should return ENXIO instead of EIEIO in open()
On Fri, Oct 18, 2019 at 2:38 PM Samuel Thibault <sthibault@debian.org> wrote:
>
> Hello,
>
> Shengjing Zhu, le ven. 18 oct. 2019 13:26:58 +0800, a ecrit:
> > When calling open(fifo_fd, O_WRONLY | O_NONBLOCK) on an fifo file, which has
> > no reader, it should return ENXIO. But on Hurd, it returns EIEIO.
>
> I guess you mean it does this consistently?
>
consistently on the qemu vm, with the image downloaded from cdimage.d.o.
I think it can be reproduced by following snippets,
```
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <sys/stat.h>
int main() {
char *s = "test";
mkfifo(s, S_IRUSR | S_IWUSR);
open(s, O_WRONLY | O_NONBLOCK);
perror(NULL);
return 0;
}
```
On linux, it prints "No such device or address";
On the hurd vm, it prints "Computer bought the farm".
--
Shengjing Zhu
Reply to: