diff options
author | Guilhem Moulin <guilhem.moulin@chalmers.se> | 2010-09-26 14:40:53 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem.moulin@chalmers.se> | 2010-09-26 14:40:53 +0200 |
commit | 38e9dfed2421cf359feba6ae56b308f45df3cb9b (patch) | |
tree | 427198e99bbb87bffbc45e0569974c930ae99f6c | |
parent | 019b9f1d113475708de93e338d876ff7a090254f (diff) |
rand -> pid
-rwxr-xr-x | pdftool.pl | 3 | ||||
-rwxr-xr-x | psresize2.pl | 2 |
2 files changed, 2 insertions, 3 deletions
@@ -198,8 +198,7 @@ if ($filetype eq "PDF") { # Need to copy the whole input to an auxiliary file, since # conversion from PDF to PS requires random access to the data - $infile = "$tmpdir/pdftool-stdin-" . - int(rand 2**16) . lc ".$filetype"; + $infile = "$tmpdir/pdftool-stdin-$$" . lc ".$filetype"; open FIN2, '>', "$infile" or die "Can't write into `$infile': $!"; diff --git a/psresize2.pl b/psresize2.pl index 7224a82..dc3ee6f 100755 --- a/psresize2.pl +++ b/psresize2.pl @@ -202,7 +202,7 @@ if (defined $infile && $infile ne "-") { # TODO: no need to such an ugly auxiliary file? - $infile = "$tmpdir/psresize-stdin-" . int(rand 2**16) . ".ps"; + $infile = "$tmpdir/psresize-stdin-$$.ps"; open FIN2, '>', "$infile" or die "Can't write into `$infile': $!"; |