diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-03 23:47:29 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-03 23:47:29 +0000 |
commit | dc7312df60f748dd2c2d6ea7290fb74ed99c1ae7 (patch) | |
tree | d15b8c078fc045a5a6f8a252c0004b0b4c14ae7d /file.c | |
parent | 792d87fd985badf6c0af8cf4bfc1acc45d7ffff9 (diff) | |
download | ruby-dc7312df60f748dd2c2d6ea7290fb74ed99c1ae7.tar.gz |
file.c: release GVL in File.{setuid?,setgid?,sticky?}
* file.c (check3rdbyte): use rb_stat to release GVL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1883,9 +1883,7 @@ check3rdbyte(VALUE fname, int mode) { struct stat st; - FilePathValue(fname); - fname = rb_str_encode_ospath(fname); - if (STAT(StringValueCStr(fname), &st) < 0) return Qfalse; + if (rb_stat(fname, &st) < 0) return Qfalse; if (st.st_mode & mode) return Qtrue; return Qfalse; } |