summaryrefslogtreecommitdiff
path: root/pod/perlfaq8.pod
diff options
context:
space:
mode:
authorSolar Designer <solar@openwall.com>2004-01-26 04:22:18 +0300
committerDave Mitchell <davem@fdisolutions.com>2004-02-01 17:40:02 +0000
commit2359510ddb135dcc6e80153f51cff0a97b20b597 (patch)
treeb074c5df813a1e3e529f0330620b456ecc4988e6 /pod/perlfaq8.pod
parenta95a5f75a0e72874474834cd9e274afa0f23b6d8 (diff)
downloadperl-2359510ddb135dcc6e80153f51cff0a97b20b597.tar.gz
Re: [perl #15063] /tmp issues
Message-ID: <20040125222218.GA13499@openwall.com> Remove insecure usage of /tmp from code and documentation p4raw-id: //depot/perl@22258
Diffstat (limited to 'pod/perlfaq8.pod')
-rw-r--r--pod/perlfaq8.pod10
1 files changed, 5 insertions, 5 deletions
diff --git a/pod/perlfaq8.pod b/pod/perlfaq8.pod
index 2fceab143f..e2cc1faa90 100644
--- a/pod/perlfaq8.pod
+++ b/pod/perlfaq8.pod
@@ -749,10 +749,10 @@ but leave its STDOUT to come out our old STDERR:
while (<PH>) { } # plus a read
To read both a command's STDOUT and its STDERR separately, it's easiest
-and safest to redirect them separately to files, and then read from those
-files when the program is done:
+to redirect them separately to files, and then read from those files
+when the program is done:
- system("program args 1>/tmp/program.stdout 2>/tmp/program.stderr");
+ system("program args 1>program.stdout 2>program.stderr");
Ordering is important in all these examples. That's because the shell
processes file descriptor redirections in strictly left to right order.
@@ -1063,8 +1063,8 @@ O_NDELAY or O_NONBLOCK flag from the Fcntl module in conjunction with
sysopen():
use Fcntl;
- sysopen(FH, "/tmp/somefile", O_WRONLY|O_NDELAY|O_CREAT, 0644)
- or die "can't open /tmp/somefile: $!":
+ sysopen(FH, "/foo/somefile", O_WRONLY|O_NDELAY|O_CREAT, 0644)
+ or die "can't open /foo/somefile: $!":
=head2 How do I install a module from CPAN?