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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
run ( $callback = null )

Описание методов

run() публичный Метод

public run ( $callback = null )