mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
5f6b04223f
commit
27cced701b
1 changed files with 1 additions and 3 deletions
4
file.c
4
file.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue