View Issue Details

IDProjectCategoryView StatusLast Update
00002991003.1(2008)/Issue 7Shell and Utilitiespublic2013-04-16 13:06
Reportercalestyo Assigned Toajosey  
PrioritynormalSeverityEditorialTypeClarification Requested
Status ClosedResolutionAccepted As Marked 
NameChristoph Anton Mitterer
OrganizationLudwig-Maximilians-Universität München
User Reference
Section14.
Page Number?
Line Number?
Interp Status---
Final Accepted Text0000299:0000538
Summary0000299: what's the exit status when a shell aborts on using the dot built in when the argument is not readable
DescriptionHi.

Perhaps this is (also) a non-issue and I just haven't found the relevant section:
http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#dot says:

>If no readable file is found, a non-interactive shell shall abort

So I guess if I have a line:
. /tmp/otherScript

in a shell script and /tmp/otherScript does not exist or is not readable the shell is intended to immediately abort, right?

What is the exit status of the "(outer) shell script" then?

Perhaps that should also be added to the "Exit Status" section of "dot".
Desired ActionClarify the exit status in case the file searched by dot does not exist or is not readable.
Tagstc1-2008

Activities

geoffclare

2010-09-02 16:19

manager   bugnote:0000538

Last edited: 2010-09-02 16:20

At page 3175 line 105724 section sh change

    1-125 A non-interactive shell detected a syntax, redirection, or
    variable assignment error.

to

    1-125 A non-interactive shell detected an error other than
    command_file not found, including but not limited to syntax,
    redirection, or variable assignment errors.

calestyo

2010-09-03 17:22

reporter   bugnote:0000541

I guess that means:
If the script is not readable or does not exist (see my example above), the outer shell exits with [1-125] (immediately), right?

However:
Is the documentation of "sh" also normative for any shell implementing the "Shell Command Language" or not?
If so, than everything would be fine, if not than (IMHO) the exit status would have to be also defined in “2. Shell Command Language”, e.g. the section “2.8.1 Consequences of Shell Errors”.

Issue History

Date Modified Username Field Change
2010-07-29 17:35 calestyo New Issue
2010-07-29 17:35 calestyo Status New => Under Review
2010-07-29 17:35 calestyo Assigned To => ajosey
2010-07-29 17:35 calestyo Name => Christoph Anton Mitterer
2010-07-29 17:35 calestyo Organization => Ludwig-Maximilians-Universität München
2010-07-29 17:35 calestyo Section => 14.
2010-07-29 17:35 calestyo Page Number => ?
2010-07-29 17:35 calestyo Line Number => ?
2010-09-02 16:19 geoffclare Note Added: 0000538
2010-09-02 16:20 geoffclare Note Edited: 0000538
2010-09-02 16:24 geoffclare Interp Status => ---
2010-09-02 16:24 geoffclare Final Accepted Text => 0000299:0000538
2010-09-02 16:24 geoffclare Status Under Review => Resolved
2010-09-02 16:24 geoffclare Resolution Open => Accepted As Marked
2010-09-02 16:28 geoffclare Tag Attached: tc1-2008
2010-09-03 17:22 calestyo Note Added: 0000541
2013-04-16 13:06 ajosey Status Resolved => Closed