sfind should print a diagnostic message on encountering a loop
#27
Closed
opened 5 months ago by tavianator
·
5 comments
No Branch/Tag Specified
master
test-sh-bug
2022-10-16
2022-09-18
2022-08-18-beta
2021-09-18
2021-09-01
2021-08-14
2021-07-29
2021-06-07
2021-05-19
2021-04-21
2021-01-05
2020-11-25
2020-11-04
2020-10-09
2020-09-22
2020-09-04
2020-08-12
2020-07-18
2020-07-01
2020-06-09
2020-05-25
2020-05-11
2020-04-18
2020-03-27
2020-03-11
2020-02-11
2019-12-05
2019-11-11
2019-10-25
2019-10-07
2019-09-22
2019-08-13
2019-07-22
2019-07-15
2019-06-13
2019-05-28
2019-04-29
2019-03-29
2019-03-11
2019-02-18
2019-01-22
2018-12-21
2018-12-06
2018-11-22
2018-10-30
2018-10-11
2018-09-26
2018-09-04
2018-08-24
2018-08-07
2018-07-25
2018-07-16
2018-07-02
2018-06-25
2018-06-11
2018-05-25
2018-05-17
2018-05-02
2018-04-17
2018-04-05
2018-03-16
2018-03-01
2018-01-26
2018-01-10
2017-12-21
2017-12-08
2017-11-21
2017-11-07
2017-10-10
2017-09-25
2017-09-07
2017-08-29
2017-08-14
2017-07-19
2017-06-29
2017-06-15
2017-05-29
2017-05-16
2017-05-03
2017-04-26
2017-03-30
2017-03-08
2017-02-16
2017-01-30
2017-01-17
2016-12-14
2016-11-17
2016-10-27
2016-10-11
2016-09-28
2016-09-18
2016-09-03
2016-08-19
2016-08-08
2016-08-01
2016-07-25
2016-07-06
2016-06-28
2016-06-20
2016-06-07
2016-05-24
2016-05-18
2016-04-28
2016-04-11
2016-04-05
2016-03-11
2016-03-02
2016-02-10
2016-02-02
2016-01-25
2016-01-18
2015-12-30
2015-12-16
2015-12-09
2015-11-26
2015-11-21
2015-11-12
2015-11-05
2015-09-16
2015-09-03
2015-08-27
2015-08-18
2015-08-12
2015-08-11
2015-08-03
2015-07-07
2015-06-24
2015-06-04
2015-05-19
2015-05-06
2015-04-24
2015-04-16
2015-04-08
2015-03-30
2015-03-16
2015-03-03
2015-02-12
2015-01-29
2015-01-01
2014-09-17
2014-06-12
2014-06-06
2014-05-05
2014-04-22
2014-04-03
2014-03-18
2014-01-27
2014-01-04
2013-12-24
2013-11-25
2013-11-09
2013-11-08
2013-10-31
2013-10-10
2013-07-29
2013-07-08
2013-06-20
2013-05-31
2013-05-10
2013-02-15
2013-01-15
2013-01-07
2012-12-28
2012-12-11
2012-06-10
2012-05-16
2012-05-06
2012-04-19
2012-04-12
2012-04-07
2012-04-05
2012-03-30
2012-02-26
2012-01-23
2011-11-09
2011-08-29
2011-08-10
2011-07-26
2011-06-22
2011-06-05
2011-05-08
2011-04-22
2011-04-12
2011-01-02
2010-12-24
2010-11-10
2010-09-22
2010-06-08
2010-03-01
2009-12-29
2009-12-17
2009-11-19
2009-11-01
2009-10-12
2009-09-20
2009-08-31
2009-08-12
2009-07-30
2009-07-06
2009-06-10
2009-05-21
2009-03-12
2009-01-05
2008-11-02
2008-09-29
2008-09-02
2008-08-25
2008-08-21
2008-08-14
2008-07-14
2008-06-16
2008-05-23
2008-04-28
2008-04-22
2008-04-07
2008-03-28
2008-01-23
2008-01-10
2008-01-02
2007-12-24
2007-12-12
2007-12-02
2023-01-12
Labels
The priority is critical Priority: High
The priority is high Priority: Low
The priority is low Priority: Medium
The priority is medium Reviewed: Confirmed
Something has been confirmed Reviewed: Duplicate
Something exists already Reviewed: Invalid
Something was marked as invalid Status: Blocked Status: Completed
Work is complete Status: Help wanted Status: In progress
Work is in progress Status: Needs feedback
Feedback is needed Status: Stale
Apply labels
Clear labels
Kind: Breaking
Kind: Bug
Kind: Documentation
Kind: Enhancement
Kind: Feature
Kind: Maintenance
Kind: Question
Kind: Security
Kind: Testing
Priority: Critical
The priority is critical Priority: High
The priority is high Priority: Low
The priority is low Priority: Medium
The priority is medium Reviewed: Confirmed
Something has been confirmed Reviewed: Duplicate
Something exists already Reviewed: Invalid
Something was marked as invalid Status: Blocked Status: Completed
Work is complete Status: Help wanted Status: In progress
Work is in progress Status: Needs feedback
Feedback is needed Status: Stale
No Label
Kind: Breaking
Kind: Bug
Kind: Documentation
Kind: Enhancement
Kind: Feature
Kind: Maintenance
Kind: Question
Kind: Security
Kind: Testing
Priority: Critical
Priority: High
Priority: Low
Priority: Medium
Reviewed: Confirmed
Reviewed: Duplicate
Reviewed: Invalid
Status: Blocked
Status: Completed
Status: Help wanted
Status: In progress
Status: Needs feedback
Status: Stale
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: schilytools/schilytools#27
Reference in new issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
The POSIX spec for find says:
But sfind doesn't:
In addition to the diagnostic message, sfind should exit with a non-zero exit code, because:
and the Utility Description Defaults say
I am not sure if returning a non-zero exit status for directory loops is the desired behaviour. Such loops crop up every once in a while and are harmless if caused by symbolic links. If find(1) failed because of such a loop, it would make it much more annoying to use.
Other implementations behave as follows:
I may file an interpretation request about this issue.
@tavianator Could you check if PR !30 fixes the issue as you envisioned?
Will put together an interpretation request in the next days.
@clausecker Just tried it, it does fix the test case.
Please see PASC interpretation request 1606.
Your interpretation has been confirmed by Geoff Clare of Austin Group. I'll go ahead and commit PR !30.