remove duplciated content
I think you double imported this. It is all in `lwp.php`
Esse commit está contido em:
@@ -74,97 +74,3 @@ if ($pid == 0) {
|
||||
pcntl_waitpid(0, $status);
|
||||
VS(pcntl_wtermsig($status), 0);
|
||||
|
||||
$output = shell_exec("echo hello");
|
||||
VS($output, "hello\n");
|
||||
|
||||
chdir("/tmp/");
|
||||
VS(shell_exec("/bin/pwd"), "/tmp\n");
|
||||
|
||||
pcntl_signal_dispatch();
|
||||
|
||||
$last_line = exec("echo hello; echo world;", $output, $ret);
|
||||
VS($output, array("hello", "world"));
|
||||
VS($last_line, "world");
|
||||
VS($ret, 0);
|
||||
|
||||
chdir("/tmp/");
|
||||
VS(exec("/bin/pwd"), "/tmp");
|
||||
|
||||
echo "heh\n";
|
||||
|
||||
passthru("echo hello; echo world;", $ret);
|
||||
VS($ret, 0);
|
||||
|
||||
chdir("/tmp/");
|
||||
passthru("/bin/pwd");
|
||||
|
||||
$last_line = system("echo hello; echo world;", $ret);
|
||||
VS($last_line, "world");
|
||||
VS($ret, 0);
|
||||
|
||||
chdir("/tmp/");
|
||||
VS(system("/bin/pwd"), "/tmp");
|
||||
|
||||
$descriptorspec =
|
||||
array(array("pipe", "r"),
|
||||
array("pipe", "w"),
|
||||
array("file", "/tmp/error-output.txt", "a"));
|
||||
|
||||
putenv("inherit_me=please");
|
||||
$process = proc_open('echo $inherit_me', $descriptorspec, $pipes);
|
||||
VERIFY($process != false);
|
||||
|
||||
fpassthru($pipes[1]);
|
||||
|
||||
VS(proc_close($process), 0);
|
||||
|
||||
// Ensure that PATH makes it through too
|
||||
$process = proc_open('echo $PATH', $descriptorspec, $pipes);
|
||||
VERIFY($process != false);
|
||||
|
||||
VERIFY(strlen(fgets($pipes[1])) > 2);
|
||||
|
||||
VS(proc_close($process), 0);
|
||||
|
||||
$descriptorspec =
|
||||
array(array("pipe", "r"),
|
||||
array("pipe", "w"),
|
||||
array("file", "/tmp/error-output.txt", "a"));
|
||||
$cwd = "/tmp";
|
||||
$env = array("some_option" => "aeiou");
|
||||
|
||||
$process = proc_open("php", $descriptorspec, $pipes, $cwd, $env);
|
||||
VERIFY($process != false);
|
||||
|
||||
fprintf($pipes[0], "<?php print(getenv('some_option')); ?>");
|
||||
fclose($pipes[0]);
|
||||
fpassthru($pipes[1]);
|
||||
VS(proc_close($process), 0);
|
||||
|
||||
$descriptorspec =
|
||||
array(array("pipe", "r"),
|
||||
array("pipe", "w"),
|
||||
array("file", "/tmp/error-output.txt", "a"));
|
||||
$process = proc_open('php', $descriptorspec, $pipes);
|
||||
VERIFY($process != false);
|
||||
VERIFY(proc_terminate($process));
|
||||
// still need to close it, not to leave a zombie behind
|
||||
proc_close($process);
|
||||
|
||||
$process = proc_open('php', $descriptorspec, $pipes);
|
||||
VERIFY($process != false);
|
||||
$ret = proc_get_status($process);
|
||||
VS($ret['command'], 'php');
|
||||
VERIFY($ret['pid'] > 0);
|
||||
VERIFY($ret['running']);
|
||||
VERIFY(!$ret['signaled']);
|
||||
VS($ret['exitcode'], -1);
|
||||
VS($ret['termsig'], 0);
|
||||
VS($ret['stopsig'], 0);
|
||||
proc_close($process);
|
||||
|
||||
VERIFY(proc_nice(0));
|
||||
|
||||
VS(escapeshellarg("\""), "'\"'");
|
||||
|
||||
VS(escapeshellcmd("perl \""), "perl \\\"");
|
||||
|
||||
@@ -8,41 +8,3 @@ bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
heh
|
||||
hello
|
||||
world
|
||||
bool(true)
|
||||
/tmp
|
||||
hello
|
||||
world
|
||||
bool(true)
|
||||
bool(true)
|
||||
/tmp
|
||||
bool(true)
|
||||
bool(true)
|
||||
please
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
aeioubool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário