From: NONAKA A. <an...@mi...> - 2001-11-16 02:17:55
|
Hi, I am trying to write my webmin module and have a question about perl programming. I have a test.cgi like below. $ cat test.cgi #!/usr/bin/perl print "Content-type: text/html; Charset=iso-8859-1\n\n"; $| = 1; print "foo<br>"; system("echo bar"); print "baz<br>"; If I run this script from shell, I works fine. But if run this script from my web browser through Webmin, perl system() function will fail with errno=13 and "bar" is not echoed. If I change this test.cgi script like system("echo bar > /dev/null"); system() will return 0. I seems to me that I cannot use stdout in the script called from system() under miniserv.pl. Q1. Is this a bug? Q2. Are there any work around? I want to write something to stdout in the script called from system(). Unfortunately , the script is not written in perl. Thanks in advance, -- Akira NONAKA Miraclelinux, Tokyo Japan |