Project

General

Profile

Bug #14207 » 14207.patch

sorah (Sorah Fukumori), 12/20/2017 08:27 AM

View differences:

io.c
#ifdef USE_COPY_FILE_RANGE
ret = nogvl_copy_file_range(stp);
if (ret != 0)
goto finish; /* error or success */
if (ret == ENOSYS || err == EPERM) {
/*
* Containerized environment might not have this freshy syscall.
* Container users shouldn't run any userland requires the newer kernel than its host,
* but it's sometime impossible, so rescuing here.
* We may see EPERM when a process lacks some capabilities in Linux...
* https://bugs.ruby-lang.org/issues/14207 [ruby-dev:50376]
*/
}
else if (ret != 0) {
goto finish; /* error or success */
}
#endif
#ifdef USE_SENDFILE
(4-4/4)