提交 f9c693df 编写于 作者: R Richard Levitte

Be more verbose when debugging is on

It's near impossible to figure out what goes wrong with the execution
of sub-commands otherwise.
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 02f7114a
...@@ -178,9 +178,11 @@ sub start ...@@ -178,9 +178,11 @@ sub start
$pid = fork(); $pid = fork();
if ($pid == 0) { if ($pid == 0) {
open(STDOUT, ">", File::Spec->devnull()) if (!$self->debug) {
or die "Failed to redirect stdout: $!"; open(STDOUT, ">", File::Spec->devnull())
open(STDERR, ">&STDOUT"); or die "Failed to redirect stdout: $!";
open(STDERR, ">&STDOUT");
}
my $execcmd = $self->execute my $execcmd = $self->execute
." s_server -no_comp -rev -engine ossltest -accept " ." s_server -no_comp -rev -engine ossltest -accept "
.($self->server_port) .($self->server_port)
...@@ -227,9 +229,11 @@ sub clientstart ...@@ -227,9 +229,11 @@ sub clientstart
if ($self->execute) { if ($self->execute) {
my $pid = fork(); my $pid = fork();
if ($pid == 0) { if ($pid == 0) {
open(STDOUT, ">", File::Spec->devnull()) if (!$self->debug) {
or die "Failed to redirect stdout: $!"; open(STDOUT, ">", File::Spec->devnull())
open(STDERR, ">&STDOUT"); or die "Failed to redirect stdout: $!";
open(STDERR, ">&STDOUT");
}
my $execcmd = "echo test | ".$self->execute my $execcmd = "echo test | ".$self->execute
." s_client -engine ossltest -connect " ." s_client -engine ossltest -connect "
.($self->proxy_addr).":".($self->proxy_port); .($self->proxy_addr).":".($self->proxy_port);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册