<?php// +----------------------------------------------------------------------// | thinkphp [ we can do it just think ]// +--------------------------------- -------------------------------------// | copyright (c) 2006~2015 http://thinkphp.cn all rights reserved.// +----------------------------------------------------------------- -----// | licensed ( http://www.apache.org/licenses/LICENSE-2.0 )// +----------- -----------------------------------------------------------// | author: yunwuxin <[ email protected]>// +---------------------------------------------------------------------- namespace think;//Main Namespace use think\process\exception\failed as processfailedexception;// Exception Failure use think\process\exception\timeout as processtimeoutexception;// Time Exception Use think\process\pipes\pipes;// Packaging use think\process\utils;// External Introduction use think\process\pipes\unix as unixpipes;// unix Packing Use think\process\pipes\windows as windowspipes;// window Packaging class process{// Similar to process management Such concepts // static properties const ERR = ' ERR ';// error const OUT = ' out ';// output const STATUS_READY = ' ready ' ;// Status Readiness const STATUS_STARTED = ' STARTED '; / status Start const STATUS_TERMINATED = ' TERMINATED ';// status Termination const STDIN = 0;// Input const STDOUT = 1;// Output const STDERR = 2;// Exceptions const timeout_precision = 0.2;// time Overflow level // private Properties private $callback;// callback function private $commandline;// command line private $cwd;// Unknown private $env;// Environment private $input;// input private $starttime;// start time private $lastOutputTime;// Last output time private $timeout;// Overflow time private $idleTimeout;// don't know what the overflow time is private $options;// options private $exitcode;// exit codes private $fallbackExitcode;// callback function exit code private $processInformation ;// processing Information private $outputDisabled = false;// output Allow status private $stdout;// Standard output stream private $stderr;// standard Error private $enhanceWindowsCompatibility = true;// Enhanced windows fault tolerance private $enhanceSigchildCompatibility;// Enhanced sub-menu fault tolerance private $process;// processing private $status = self::STATUS_READY;// Ready status private $incrementalOutputOffset = 0;// add output offset private $ incrementalerroroutputoffset = 0;// error output offset private $ tty;// similar to sign private $pty;// Ibid unknown private $useFileHandles = false;// using file handling handles /** @var Pipes */ private $processPipes;// pipe Parameters private $latestSignal;// the last Parameters private static $sigchild;// child elements
This article is from the "Focus on PHP Group number: 414194301" blog, please be sure to keep this source http://jingshanls.blog.51cto.com/3357095/1884130
[Li Jingshan php] every day tp5-20170119|thinkphp5-process.php-1