coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-9.0.193-54bec on Solaris 11.4


From: Pádraig Brady
Subject: Re: coreutils-9.0.193-54bec on Solaris 11.4
Date: Mon, 11 Apr 2022 14:55:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Thunderbird/97.0

On 11/04/2022 02:44, Bruno Haible wrote:
Pádraig Brady wrote:

FAIL: tests/install/basic-1
===========================
FAIL: tests/mv/diag
===================

These two are the same issue I think ...

diff --git a/src/system.h b/src/system.h
index c24cb4dc3..d2c473a59 100644
--- a/src/system.h
+++ b/src/system.h
@@ -140,9 +140,12 @@ target_directory_operand (char const *file)
     bool is_a_dir = false;
     struct stat st;

-  /* On old systems like Solaris 10, check with stat first
-     lest we try to open a fifo for example and hang.  */
-  if (!O_DIRECTORY && stat (file, &st) == 0)
+  /* On old systems without O_DIRECTORY, like Solaris 10,
+     check with stat first lest we try to open a fifo for example and hang.
+     Also check on systems with O_PATHSEARCH == O_SEARCH, like Solaris 11,
+     where open was seen to return EPERM for non directories.  */
+  if (!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH)
+      && stat (file, &st) == 0)

Isn't there a parenthesizing mistake here? I would write
      if ((!O_DIRECTORY || (O_PATHSEARCH == O_SEARCH))
          && stat (file, &st) == 0)

This patch does not apply cleanly to the snapshot source. I tried
a similar patch, but it did not help.

Yes sorry, I had the correct parentheses in the attached patch.
Thanks for confirming the equivalent didn't address this issue.
I'll need to dig into this more.

thanks,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]