From: Craig A. Berry Date: Wed, 11 Aug 1999 14:31:11 +0000 (-0500) Subject: Bypass fsync(NULL) (crashes miniperl compiled with DEC C 5.2) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a5da935345a673c66c903bfd517404de47f816e1;p=p5sagit%2Fp5-mst-13.2.git Bypass fsync(NULL) (crashes miniperl compiled with DEC C 5.2) Sender: owner-perl5-porters@perl.org To: vmsperl@perl.org, perl5-porters@perl.org, sarathy@activestate.com, bailey@newman.upenn.edu Subject: [PATCH 5.005_60] vms.c my_flush patch to circumvent fileno problem Message-Id: <4.2.0.58.19990811141007.00b8f8a0@mmtnt11.metamor.com> p4raw-id: //depot/cfgperl@3959 --- diff --git a/vms/vms.c b/vms/vms.c index 0845ff9..bf2726f 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -3576,7 +3576,7 @@ int my_flush(FILE *fp) { int res; - if ((res = fflush(fp)) == 0) { + if ((res = fflush(fp)) == 0 && fp) { #ifdef VMS_DO_SOCKETS Stat_t s; if (Fstat(fileno(fp), &s) == 0 && !S_ISSOCK(s.st_mode))