This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Bypass fsync(NULL) (crashes miniperl compiled with DEC C 5.2)
authorCraig A. Berry <craigberry@mac.com>
Wed, 11 Aug 1999 14:31:11 +0000 (09:31 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 11 Aug 1999 22:11:35 +0000 (22:11 +0000)
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

vms/vms.c

index 0845ff9..bf2726f 100644 (file)
--- 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))