This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #117265] move the "glob failed" warning to the point of failure
[perl5.git] / doio.c
diff --git a/doio.c b/doio.c
index 3988c78..f2c3752 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -2447,6 +2447,12 @@ Perl_vms_start_glob
     fp = IoIFP(io);
 #endif /* !VMS */
     LEAVE;
+
+    if (!fp && ckWARN(WARN_GLOB)) {
+        Perl_warner(aTHX_ packWARN(WARN_GLOB), "glob failed (can't start child: %s)",
+                    Strerror(errno));
+    }
+
     return fp;
 }