Prefix WORKER_STATUS_FD with WCF_
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 2 Jul 2020 10:48:58 +0000 (12:48 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 2 Jul 2020 10:51:35 +0000 (12:51 +0200)
wcfsetup/install/files/lib/system/cli/command/WorkerCLICommand.class.php

index 3e2789bb90fd338871dde2b757c0915de40b9861..45df1ebb6e10d108837249b30808b0d5327789c3 100644 (file)
@@ -141,8 +141,8 @@ class WorkerCLICommand implements IArgumentedCLICommand {
                ]));
                $progress = 0;
                $output = null;
-               if (!empty($_ENV['WORKER_STATUS_FD'])) {
-                       $output = new File("php://fd/".$_ENV['WORKER_STATUS_FD'], "w");
+               if (!empty($_ENV['WCF_WORKER_STATUS_FD'])) {
+                       $output = new File("php://fd/".$_ENV['WCF_WORKER_STATUS_FD'], "w");
                }
                for ($i = ($threadId !== null ? ($threadId + 1) : 0); $progress < 100; $i += $threads) {
                        $worker->setLoopCount($i);
@@ -200,12 +200,12 @@ class WorkerCLICommand implements IArgumentedCLICommand {
                
                // Reuse the environment.
                // - Specify TERM=dumb to prevent the worker from messing around with our terminal.
-               // - Specify WORKER_STATUS_FD to prevent the administrator from manually giving a threadId,
+               // - Specify WCF_WORKER_STATUS_FD to prevent the administrator from manually giving a threadId,
                //   causing the worker to write into an arbitrary file descriptor (most likely the DB connection).
                // - Specify WCF_SESSION_ID to perform the login.
                $env = array_merge($_ENV, [
                        'TERM' => 'dumb',
-                       'WORKER_STATUS_FD' => 3,
+                       'WCF_WORKER_STATUS_FD' => 3,
                        'WCF_SESSION_ID' => CLIWCF::getSession()->sessionID,
                ]);