Project

General

Profile

Actions

Bug #82246

closed

CLI return code overflow and reserved code 255

Added by Oliver Eglseder over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Category:
CLI
Target version:
Start date:
2017-08-30
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

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).

Actions

Also available in: Atom PDF