Project

General

Profile

Bug #14207 ยป 14207.patch

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

View differences:

io.c
11114 11114

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

  
11121 11131
#ifdef USE_SENDFILE