* src/fileio.c (Fcopy_file): Open the input file with O_NONBLOCK.
This prevents a hang if the input file is a FIFO.
If it’s a regular file O_NONBLOCK has no effect;
otherwise the file is soon rejected anyway.
report_file_error ("Copying permissions to", newname);
}
#else /* not WINDOWSNT */
- ifd = emacs_open (SSDATA (encoded_file), O_RDONLY, 0);
+ ifd = emacs_open (SSDATA (encoded_file), O_RDONLY | O_NONBLOCK, 0);
if (ifd < 0)
report_file_error ("Opening input file", file);