This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
amigaos4: check that the errno indicates an error
authorAndy Broad <andy@broad.ology.org.uk>
Wed, 19 Aug 2015 16:28:21 +0000 (12:28 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 5 Sep 2015 15:12:43 +0000 (11:12 -0400)
doio.c

diff --git a/doio.c b/doio.c
index d038986..6a0d80c 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1528,9 +1528,14 @@ S_exec_failed(pTHX_ const char *cmd, int fd, int do_report)
 {
     const int e = errno;
     PERL_ARGS_ASSERT_EXEC_FAILED;
-    if (ckWARN(WARN_EXEC))
-       Perl_warner(aTHX_ packWARN(WARN_EXEC), "Can't exec \"%s\": %s",
-                   cmd, Strerror(e));
+#ifdef __amigaos4__
+    if (e)
+#endif
+    {
+       if (ckWARN(WARN_EXEC))
+           Perl_warner(aTHX_ packWARN(WARN_EXEC), "Can't exec \"%s\": %s",
+                       cmd, Strerror(e));
+    }
     if (do_report) {
         /* XXX silently ignore failures */
         PERL_UNUSED_RESULT(PerlLIO_write(fd, (void*)&e, sizeof(int)));