PHP 클래스 AbortableProcess

Process is relying on error_get_last to learn if the stream reading was interrupted by a signal (see UnixSignal's readAndWrite, the hasSystemCallBeenInterrupted call). Unfortunately this doesn't work if we trapp the signal, which wipes out the error, which makes Process think it's some other kind of error which makes it commit suicide for no good reason. Workaround is to avoid blocking stream_select as ->run nor ->wait do. Fortunately we can call ->isRunning instead, which uses a non-blocking readPipes via updateStatus. This means our callback will still get called if we loop over ->isRunning.
상속: extends Symfony\Component\Process\Process
파일 보기 프로젝트 열기: silverstripe/deploynaut 1 사용 예제들

공개 메소드들

메소드 설명
run ( $callback = null )

메소드 상세

run() 공개 메소드

public run ( $callback = null )