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

Appearance settings

Commit c475704

Browse filesBrowse files
committed
bug #13683 [PROCESS] make sure /dev/tty is readable (staabm)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #13683). Discussion ---------- [PROCESS] make sure /dev/tty is readable When using Process from Web-SAPI it is likely that the webserver user doesn't has rights to use /dev/tty | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #13261 | License | MIT | Doc PR | - Commits ------- 935afe6 [PROCESS] make sure /dev/tty is readable
2 parents cae6de6 + 935afe6 commit c475704
Copy full SHA for c475704

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Process.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,9 @@ public function setTty($tty)
792792
if ('\\' === DIRECTORY_SEPARATOR && $tty) {
793793
throw new RuntimeException('TTY mode is not supported on Windows platform.');
794794
}
795+
if ($tty && (!file_exists('/dev/tty') || !is_readable('/dev/tty'))) {
796+
throw new RuntimeException('TTY mode requires /dev/tty to be readable.');
797+
}
795798

796799
$this->tty = (bool) $tty;
797800

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.