projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b6211b
)
Capture output directly instead of using a temp file
author
Jamie Cameron
<jcameron@webmin.com>
Sat, 11 Sep 2010 18:43:16 +0000
(11:43 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Sat, 11 Sep 2010 18:43:16 +0000
(11:43 -0700)
bind8/bind8-lib.pl
patch
|
blob
|
history
diff --git
a/bind8/bind8-lib.pl
b/bind8/bind8-lib.pl
index
eec7b14
..
59cdb7e
100755
(executable)
--- a/
bind8/bind8-lib.pl
+++ b/
bind8/bind8-lib.pl
@@
-1766,10
+1766,8
@@
else {
$cmd = "chroot $chroot $config{'named_path'} -c $config{'named_conf'} $user </dev/null 2>&1";
}
-local $temp = &transname();
-local $rv = &system_logged("$cmd </dev/null >$temp 2>&1");
-local $out = &read_file_contents($temp);
-unlink($temp);
+local $out = &backquote_logged("$cmd 2>&1 </dev/null");
+local $rv = $?;
if ($rv || $out =~ /chroot.*not available/i) {
return &text('start_error', $out ? "<tt>$out</tt>" : "Unknown error");
}