View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000240 | 1003.1(2008)/Issue 7 | Shell and Utilities | public | 2010-04-16 11:23 | 2013-04-16 13:06 |
Reporter | ajosey | Assigned To | ajosey | ||
Priority | normal | Severity | Editorial | Type | Clarification Requested |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Andrew Josey | ||||
Organization | The Open Group | ||||
User Reference | IEEE-interp-23-feb-2010-xcu-cd | ||||
Section | cd | ||||
Page Number | 2506 | ||||
Line Number | 80243-80245 | ||||
Interp Status | Approved | ||||
Final Accepted Text | See 0000240:0000417 | ||||
Summary | 0000240: cd $OLDPWD variable | ||||
Description | (this is a forwarded Interpretation request from IEEE) Standard says to set $OLDPWD to $PWD if "the PWD environment variable is changed" or if “the PWD environment variable value is changed”? Currently all the existing Posix shells don't compare OLDPWD and PWD values, thus the result of cd command might be that OLDPWD is set to current directory. | ||||
Desired Action | None. Clarification is being requested | ||||
Tags | tc1-2008 |
|
The standard clearly states that the OLDPWD environment variable must be set to the the current working directory immediately prior to the call to cd as long as the cd command completes successfully, and conforming implementations must conform to this. Rationale: ------------- When the standard requires that the PWD environment variable be set, that constitutes a change to the PWD environment variable even if the new value of PWD is the same as the old value of PWD. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- To match other wording in the description of CD and remove the confusion noted by the submitter, change: PWD environment variable is changedon P2506, L80243 to: PWD environment variable is setand change: OLDPWD environment variable shall also be changedon P2506, L80244 to: OLDPWD environment variable shall also be set Also, change: None.in the EXAMPLES section on P2508, L20323 to: The following template can be used to perform processing in the directory specified by "location" and end up in the current working directory in use before the first cd command was issued: cd location if [ $? -ne 0 ] then print error message exit 1 fi ... do whatever is desired as long as the OLDPWD environment variable is not modified cd - |
|
Comments/objections on the proposed interpretation are due by 31 Aug 2010 |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-04-16 11:23 | ajosey | New Issue | |
2010-04-16 11:23 | ajosey | Status | New => Under Review |
2010-04-16 11:23 | ajosey | Assigned To | => ajosey |
2010-04-16 11:23 | ajosey | Name | => Andrew Josey |
2010-04-16 11:23 | ajosey | Organization | => The Open Group |
2010-04-16 11:23 | ajosey | User Reference | => IEEE-interp-23-feb-2010-xcu-cd |
2010-04-16 11:23 | ajosey | Section | => cd |
2010-04-16 11:23 | ajosey | Page Number | => - |
2010-04-16 11:23 | ajosey | Line Number | => - |
2010-04-16 11:23 | ajosey | Interp Status | => --- |
2010-04-22 16:26 | Don Cragun | Page Number | - => 2506 |
2010-04-22 16:26 | Don Cragun | Line Number | - => 80243-80245 |
2010-05-06 18:30 | Don Cragun | Note Added: 0000417 | |
2010-05-06 18:34 | Don Cragun | Interp Status | --- => Pending |
2010-05-06 18:34 | Don Cragun | Final Accepted Text | => See 0000240:0000417 |
2010-05-06 18:34 | Don Cragun | Status | Under Review => Interpretation Required |
2010-05-06 18:34 | Don Cragun | Resolution | Open => Accepted As Marked |
2010-07-30 09:29 | ajosey | Interp Status | Pending => Proposed |
2010-07-30 09:29 | ajosey | Note Added: 0000509 | |
2010-09-03 06:21 | ajosey | Interp Status | Proposed => Approved |
2010-09-24 14:16 | geoffclare | Tag Attached: tc1-2008 | |
2013-04-16 13:06 | ajosey | Status | Interpretation Required => Closed |