[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#942558: hurd: should return ENXIO instead of EIEIO in open()



On Fri, 2019-10-18 at 23:37 +0800, Shengjing Zhu wrote:
> 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".
> 
Confirmed:
./test_fifo
Computer bought the farm

And it does not seem to kill the translator:
ps -feM|grep fifo
     srs 11016   411  0:00.00 /hurd/fifo


Reply to: