summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Faylor <cgf@bbc.com>1996-10-09 19:07:24 +0000
committerAndy Dougherty <doughera@lafcol.lafayette.edu>1996-10-09 19:07:24 +0000
commit3efb289c5aa248a1ab52c54c98d6021518b11684 (patch)
tree9f959fdc623a0296e3369009c40861ba1e99c0e2
parent2c19844b698b17b45488d6c855e43f78c774c1f1 (diff)
downloadperl-3efb289c5aa248a1ab52c54c98d6021518b11684.tar.gz
perl 5.003_07: pp_sys.c
Date: Wed, 9 Oct 1996 19:07:24 GMT From: Chris Faylor <cgf@bbc.com> The problem is that SCO apparently needs to have a file opened with write privileges for chsize to work correctly.
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 72ea495e89..8ce02b53aa 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1286,7 +1286,7 @@ PP(pp_truncate)
{
int tmpfd;
- if ((tmpfd = open(SvPV (sv, na), 0)) < 0)
+ if ((tmpfd = open(SvPV (sv, na), O_RDWR)) < 0)
result = 0;
else {
if (my_chsize(tmpfd, len) < 0)