mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-21 04:17:35 +00:00
Don’t hang when copying FIFOs
* 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.
This commit is contained in:
parent
09b5f00613
commit
ab3cfa4a17
1 changed files with 1 additions and 1 deletions
|
|
@ -2219,7 +2219,7 @@ permissions. */)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue