From: Jarkko Hietaniemi Date: Sat, 14 Aug 1999 13:06:12 +0000 (+0000) Subject: Note about filesize limits. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=94e4c24434948b232e1a08fce7b0c2f871b1262e;p=p5sagit%2Fp5-mst-13.2.git Note about filesize limits. p4raw-id: //depot/cfgperl@3990 --- diff --git a/doio.c b/doio.c index 73f9429..d3d4d97 100644 --- a/doio.c +++ b/doio.c @@ -1022,6 +1022,11 @@ Perl_do_print(pTHX_ register SV *sv, PerlIO *fp) tmps = SvPV(sv, len); break; } + /* To detect whether the process is about to overstep its + * filesize limit we would need getrlimit(). We could then + * also transparently raise the limit with setrlimit() -- + * but only until the system hard limit/the filesystem limit, + * at which we would get EPERM. --jhi */ if (len && (PerlIO_write(fp,tmps,len) == 0 || PerlIO_error(fp))) return FALSE; return !PerlIO_error(fp); diff --git a/pp_sys.c b/pp_sys.c index ecaebe3..afac5ab 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -1667,6 +1667,7 @@ PP(pp_send) else #endif { + /* See the note at doio.c:do_print about filesize limits. --jhi */ length = PerlLIO_write(PerlIO_fileno(IoIFP(io)), buffer+offset, length); }