Bug #82246
closedCLI return code overflow and reserved code 255
100%
Description
When executing a command which results in an exception the exception code will be passed to PHP's function exit() without further investigation, which will actually result in any return code between 0 and 255.
This has two bad implications, first of all using timestamps as an exception code will eventually yield a code (e.g. 1504100352) that results in 0 retuned by the command which implies that there was nothing wrong (very bad!) and other codes like "1504100095" which result in 255, which is reserved for PHP according to the documentation of PHP: http://php.net/manual/en/function.exit.php
Affected LTS version are 7 and 8. Version 9 relies on symfony/console which limits these codes at least to 255 (i already submitted a patch to limit them to 254).
Updated by Gerrit Code Review about 7 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53839
Updated by Gerrit Code Review about 7 years ago
Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53839
Updated by Gerrit Code Review about 7 years ago
Patch set 3 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53839
Updated by Gerrit Code Review about 7 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53842
Updated by Oliver Eglseder about 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 22a209325807c8a4de698333a37d5bdcc019e28d.