From: Chris Faylor Date: Wed, 9 Oct 1996 19:07:24 +0000 (+0000) Subject: perl 5.003_07: pp_sys.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3efb289c5aa248a1ab52c54c98d6021518b11684;p=p5sagit%2Fp5-mst-13.2.git perl 5.003_07: pp_sys.c Date: Wed, 9 Oct 1996 19:07:24 GMT From: Chris Faylor The problem is that SCO apparently needs to have a file opened with write privileges for chsize to work correctly. --- diff --git a/pp_sys.c b/pp_sys.c index 72ea495..8ce02b5 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)