Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/PhutilProcessQuery.php
Context not available. | |||||
$instance = null; | $instance = null; | ||||
if ($ref->getIsOverseer()) { | if ($ref->getIsOverseer()) { | ||||
$matches = null; | $matches = null; | ||||
if (preg_match('/-l (\S+)/', $command, $matches)) { | if (@preg_match('/-l (\S+)/', $command, $matches)) { | ||||
$instance = $matches[1]; | $instance = $matches[1]; | ||||
} | } | ||||
} | } | ||||
Context not available. | |||||
$proc_cmdline = sprintf('/proc/%d/cmdline', $pid); | $proc_cmdline = sprintf('/proc/%d/cmdline', $pid); | ||||
try { | try { | ||||
$argv = Filesystem::readFile($proc_cmdline); | $argv = Filesystem::readFile($proc_cmdline); | ||||
$argv = explode("\0", $argv); | $argv = @explode("\0", $argv); | ||||
// The output itself is terminated with "\0", so remove the final empty | // The output itself is terminated with "\0", so remove the final empty | ||||
// argument. | // argument. | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0