/** * Return whether or not output is waiting to be read (still in the buffer) * @param string $fileId the unique file id generated by ProcMonitor::Start * @return bool True: Output is in the buffer, False: Output buffer is empty * @see ProcMonitor::GetOutput * @see ProcMonitor::Start */ public function OutputWaiting($fileId) { $handle = fopen(ProcMonitor::GetFName($fileId), "r"); $fstat = fstat($handle); fclose($handle); if ($fstat['size'] > ProcMonitor::GetBytesRead($fileId)) { return true; } else { return false; } }