Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbd264a

Browse files
committed
adds cache for isPtySupported()
1 parent6c11207 commitdbd264a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/Symfony/Component/Process/Process.php‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,24 @@ class Process
127127
*/
128128
publicstaticfunctionisPtySupported()
129129
{
130+
static$result;
131+
132+
if (null !==$result) {
133+
return$result;
134+
}
135+
130136
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
131-
returnfalse;
137+
return$result =false;
132138
}
133139

134140
$proc = @proc_open('echo 1',array(array('pty'),array('pty'),array('pty')),$pipes);
135141
if (is_resource($proc)) {
136142
proc_close($proc);
137143

138-
returntrue;
144+
return$result =true;
139145
}
140146

141-
returnfalse;
147+
return$result =false;
142148
}
143149

144150
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp