A NOTE has been added to this issue. ====================================================================== http://austingroupbugs.net/view.php?id=1300 ====================================================================== Reported By: dmitry_goncharov Assigned To: ====================================================================== Project: Online Pubs Issue ID: 1300 Category: Base Definitions Type: Clarification Requested Severity: Editorial Priority: normal Status: New Name: Dmitry Goncharov Organization: User Reference: URL: Section: glob ====================================================================== Date Submitted: 2019-11-15 22:14 UTC Last Modified: 2019-11-19 07:32 UTC ====================================================================== Summary: clarify GLOB_MARK behavior ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0001301 clarify glob("/", GLOB_MARK, ... ======================================================================
---------------------------------------------------------------------- (0004662) stephane (reporter) - 2019-11-19 07:32 http://austingroupbugs.net/view.php?id=1300#c4662 ---------------------------------------------------------------------- Still, since it's at odds with ls -p or the markdirs option of zsh, it wouldn't harm mentioning again in a non-normative section of the glob() spec. (completion listings of most shells (busybox, bash, ksh, Byron's rc, yash, fish at least) work like GLOB_MARK though. csh, tcsh and zsh use a @ suffix à la ls -F). In any case, the wording has a related slight problem: if the current directory is readable, but not searchable, for the expansion of *, an implementation cannot tell whether an entry is a symlink to a directory or to some other file. They may be able to tell if an entry is a directory or not if that information is stored in the directory (d_type of struct dirent returned by readdir() for instance). The "is a directory or a symlink to a directory" wording is ambiguous for files that are a symlink to symlink to a directory. So it should probably be something like: "Each pathname that matches pattern and that is determined to be a directory after symlink resolution shall have a <slash> appended." (whether the inability to "mark" a directory should be flagged as an error with GLOB_ERR was mentioned on the ML or a different bug not too long ago IIRC, but I don't remember the outcome). Issue History Date Modified Username Field Change ====================================================================== 2019-11-15 22:14 dmitry_goncharovNew Issue 2019-11-15 22:14 dmitry_goncharovName => Dmitry Goncharov 2019-11-15 22:14 dmitry_goncharovSection => glob 2019-11-15 22:36 Don Cragun Relationship added duplicate of 0001301 2019-11-15 22:40 Don Cragun Note Added: 0004658 2019-11-15 22:40 Don Cragun Status New => Closed 2019-11-15 22:40 Don Cragun Resolution Open => Duplicate 2019-11-15 22:42 Don Cragun Note Edited: 0004658 2019-11-15 23:13 Don Cragun Relationship deleted 0001301 2019-11-15 23:14 Don Cragun Note Added: 0004660 2019-11-15 23:14 Don Cragun Status Closed => New 2019-11-15 23:14 Don Cragun Resolution Duplicate => Open 2019-11-15 23:16 Don Cragun Relationship added related to 0001301 2019-11-18 15:47 geoffclare Note Added: 0004661 2019-11-19 07:32 stephane Note Added: 0004662 ======================================================================