Introduction
Introduction Statistics Contact Development Disclaimer Help
austingroupbugs.net.rss.xml - sfeed_tests - sfeed tests and RSS and Atom files
git clone git://git.codemadness.org/sfeed_tests
Log
Files
Refs
README
LICENSE
---
austingroupbugs.net.rss.xml (80837B)
---
1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- RSS generated by Flaimo.com RSS Builder [2022-02-18 13:56:11] -->…
3 <channel>
4 <docs>https://www.austingroupbugs.net/</docs>
5 <description>Austin Group Defect Tracker - ISSUES</description>
6 <link>https://www.austingroupbugs.net/</link>
7 <title>Austin Group Defect Tracker - ISSUES</title>
8 <image>
9 <title>Austin Group Defect Tracker - ISSUES</title>
10 <url>https://www.austingroupbugs.net/images/mantis_logo_button.gif</url>
11 <link>https://www.austingroupbugs.net/</link>
12 <description>Austin Group Defect Tracker - ISSUES</description>
13 </image>
14 <category>All Projects</category>
15 <ttl>10</ttl>
16 <sy:updatePeriod>hourly</sy:updatePeriod>
17 <sy:updateFrequency>1</sy:updateFrequency>
18 <sy:updateBase>2022-02-18T13:56:11+00:00</sy:updateBase>
19 <item>
20 <title>0001538: what -s is poorly described, uses the word &quot;quit&qu…
21 <link>https://www.austingroupbugs.net/view.php?id=1538</link>
22 <description>On:&lt;br /&gt;
23 &lt;a href=&quot;https://pubs.opengroup.org/onlinepubs/9699919799/utilit…
24 The -s option for what is described as so:&lt;br /&gt;
25 Quit after finding the first occurrence of the pattern in each file.&lt;…
26 I find the usage of the word 'quit' here unfortunate, as it can be read …
27 Both &quot;in each file&quot; and the behavior of what on various BSDs l…
28 &lt;br /&gt;
29 In the man pages on NetBSD and OpenBSD, they describe -s as follows:&lt;…
30 If the -s option is specified, only the first occurrence of an identific…
31 On FreeBSD, the following phrasing is used:&lt;br /&gt;
32 Stop searching each file after the first match.&lt;br /&gt;
33 I also checked the phrasing in Solaris 10 and AIX 7.2 but don't have acc…
34 &lt;br /&gt;
35 I don't know if this is an Issue 7 or Issue 8 sort of thing to fix, so I…
36 <guid>https://www.austingroupbugs.net/view.php?id=1538</guid>
37 <author>andras_farkas &lt;[email protected]&gt;</author>
38 <comments>https://www.austingroupbugs.net/view.php?id=1538#bugnotes</com…
39 </item>
40 <item>
41 <title>0001558: require [^...] in addition to [!...] for bracket express…
42 <link>https://www.austingroupbugs.net/view.php?id=1558</link>
43 <description>(page/line numbers above are from Draft 2.1)&lt;br /&gt;
44 &lt;br /&gt;
45 There's a very unfortunate difference between sh/fnmatch globs and regex…
46 &lt;br /&gt;
47 The only reason is that the Bourne shell had decided to keep ^ as a pipe…
48 &lt;br /&gt;
49 But POSIX sh it not and is not compatible with the Bourne shell and POSI…
50 &lt;br /&gt;
51 Among common sh implementations, the only exceptions that I know are ksh…
52 &lt;br /&gt;
53 All of bash, zsh, yash, dash, BSDs (except those like OpenBSD, MirBSD th…
54 <guid>https://www.austingroupbugs.net/view.php?id=1558</guid>
55 <author>stephane &lt;[email protected]&gt;</author>
56 <comments>https://www.austingroupbugs.net/view.php?id=1558#bugnotes</com…
57 </item>
58 <item>
59 <title>0001542: A certain example for puts, fputs, time, localtime, and …
60 <link>https://www.austingroupbugs.net/view.php?id=1542</link>
61 <description>This is a very minor issue:&lt;br /&gt;
62 In some examples in the standard, the following text is used&lt;br /&gt;
63 &quot;There are %d minutes to the event.\n&quot;&lt;br /&gt;
64 while in other (often otherwise identical) examples, the following text …
65 &quot;There are still %d minutes to the event.\n&quot;&lt;br /&gt;
66 &lt;br /&gt;
67 It's easy to grep the standard for these instances, but they appear on:&…
68 &lt;a href=&quot;https://pubs.opengroup.org/onlinepubs/9699919799/functi…
69 &lt;a href=&quot;https://pubs.opengroup.org/onlinepubs/9699919799/functi…
70 &lt;a href=&quot;https://pubs.opengroup.org/onlinepubs/9699919799/functi…
71 &lt;a href=&quot;https://pubs.opengroup.org/onlinepubs/9699919799/functi…
72 &lt;a href=&quot;https://pubs.opengroup.org/onlinepubs/9699919799/functi…
73 &lt;br /&gt;
74 They could be changed for consistency.</description>
75 <guid>https://www.austingroupbugs.net/view.php?id=1542</guid>
76 <author>andras_farkas &lt;[email protected]&gt;</author>
77 <comments>https://www.austingroupbugs.net/view.php?id=1542#bugnotes</com…
78 </item>
79 <item>
80 <title>0001541: Overabundance of parentheses in atoi() example</title>
81 <link>https://www.austingroupbugs.net/view.php?id=1541</link>
82 <description>On&lt;br /&gt;
83 &lt;a href=&quot;https://pubs.opengroup.org/onlinepubs/9699919799/functi…
84 the example has redundant parentheses.</description>
85 <guid>https://www.austingroupbugs.net/view.php?id=1541</guid>
86 <author>andras_farkas &lt;[email protected]&gt;</author>
87 <comments>https://www.austingroupbugs.net/view.php?id=1541#bugnotes</com…
88 </item>
89 <item>
90 <title>0001562: printf utility: clarify what is (byte) string an what is…
91 <link>https://www.austingroupbugs.net/view.php?id=1562</link>
92 <description>3.375 String, defines:&lt;br /&gt;
93 &quot;A contiguous sequence of bytes terminated by and including the fir…
94 i.e. a byte string, not - by itself - subject to the locale.&lt;br /&gt;
95 &lt;br /&gt;
96 &lt;br /&gt;
97 The description of the printf utility, uses the phrase &quot;string&quot…
98 &lt;br /&gt;
99 &lt;br /&gt;
100 Line 104239, OPERANDS:&lt;br /&gt;
101 &gt; format&lt;br /&gt;
102 &gt; A string describing the format to use to write the remaining operan…
103 &gt; EXTENDED DESCRIPTION section.&lt;br /&gt;
104 &lt;br /&gt;
105 =&gt; At least when following line 104273...&lt;br /&gt;
106 &quot;The format operand shall be used as the format string described in…
107 &quot;The format is a character string that contains three types of obje…
108 &lt;br /&gt;
109 ... format should be a character string, and as such, it would be subjec…
110 &lt;br /&gt;
111 =&gt; OTOH, the APPLICATION USAGE tells that it's modelled after the pri…
112 &lt;br /&gt;
113 &lt;br /&gt;
114 (See below, for an analogue example for why I think the difference matte…
115 &lt;br /&gt;
116 &lt;br /&gt;
117 &gt; argument&lt;br /&gt;
118 &gt; The strings to be written to standard output, under the control of …
119 &gt; See the EXTENDED DESCRIPTION section.&lt;br /&gt;
120 &lt;br /&gt;
121 Seems clearly a (byte) string, whose interpretation (byte, character) de…
122 &lt;br /&gt;
123 &lt;br /&gt;
124 &lt;br /&gt;
125 It may further make sense, to explicitly clarify in line 104288, that st…
126 Consider e.g. some weird multibyte locale in which a character named A' …
127 A string: A'n ... that is 0xAA 0x5C 0x6E should probably be interpreted…
128 &lt;br /&gt;
129 &lt;br /&gt;
130 Given that the whole section uses quite often the term &quot;format stri…
131 &lt;br /&gt;
132 The same probably at line 104321.</description>
133 <guid>https://www.austingroupbugs.net/view.php?id=1562</guid>
134 <author>calestyo &lt;[email protected]&gt;</author>
135 <comments>https://www.austingroupbugs.net/view.php?id=1562#bugnotes</com…
136 </item>
137 <item>
138 <title>0001531: time: follow-up to issue #1440</title>
139 <link>https://www.austingroupbugs.net/view.php?id=1531</link>
140 <description>&quot;&quot;</description>
141 <guid>https://www.austingroupbugs.net/view.php?id=1531</guid>
142 <author>steffen &lt;[email protected]&gt;</author>
143 <comments>https://www.austingroupbugs.net/view.php?id=1531#bugnotes</com…
144 </item>
145 <item>
146 <title>0001530: nohup: follow-up to issue #1440</title>
147 <link>https://www.austingroupbugs.net/view.php?id=1530</link>
148 <description>&quot;&quot;</description>
149 <guid>https://www.austingroupbugs.net/view.php?id=1530</guid>
150 <author>steffen &lt;[email protected]&gt;</author>
151 <comments>https://www.austingroupbugs.net/view.php?id=1530#bugnotes</com…
152 </item>
153 <item>
154 <title>0001529: ex: follow-up to issue #1440</title>
155 <link>https://www.austingroupbugs.net/view.php?id=1529</link>
156 <description>&quot;&quot;</description>
157 <guid>https://www.austingroupbugs.net/view.php?id=1529</guid>
158 <author>steffen &lt;[email protected]&gt;</author>
159 <comments>https://www.austingroupbugs.net/view.php?id=1529#bugnotes</com…
160 </item>
161 <item>
162 <title>0001526: Update fdopen() mode description to match new fopen() te…
163 <link>https://www.austingroupbugs.net/view.php?id=1526</link>
164 <description>The new 'e' and 'x' mode string characters for fopen() have…
165 &lt;br /&gt;
166 The current wording is also vague about what happens if there is a misma…
167 &lt;br /&gt;
168 * Only Linux set O_APPEND if it was clear when using &quot;a&quot;&lt;br…
169 * All four left O_APPEND set if it was set when using &quot;w&quot;&lt;b…
170 &lt;br /&gt;
171 Therefore the suggested changes make it unspecified for &quot;a&quot; bu…
172 &lt;br /&gt;
173 As an editorial matter, the use of the phrase &quot;Open a file&quot; is…
174 &lt;br /&gt;
175 Finally, the new changes include a typographical conventions change to u…
176 <guid>https://www.austingroupbugs.net/view.php?id=1526</guid>
177 <author>geoffclare &lt;[email protected]&gt;</author>
178 <comments>https://www.austingroupbugs.net/view.php?id=1526#bugnotes</com…
179 </item>
180 <item>
181 <title>0001524: open() flags used by fopen()</title>
182 <link>https://www.austingroupbugs.net/view.php?id=1524</link>
183 <description>The lead-in to the table describing the open() flags used b…
184 &lt;blockquote&gt;The file descriptor associated with the opened stream …
185 but it doesn't say that additional flags can't silently be added to the …
186 &lt;br /&gt;
187 Implementations of &lt;i&gt;fopen&lt;/i&gt;( ) should not be allowed to …
188 <guid>https://www.austingroupbugs.net/view.php?id=1524</guid>
189 <author>Don Cragun &lt;Don [email protected]&gt;</author>
190 <comments>https://www.austingroupbugs.net/view.php?id=1524#bugnotes</com…
191 </item>
192 <item>
193 <title>0001536: Unimplemented requirements in fd duplication</title>
194 <link>https://www.austingroupbugs.net/view.php?id=1536</link>
195 <description>Note: the text in question appears unchanged in Issue 8 Dra…
196 but obviously the page &amp; line numbers differ.&lt;br /&gt;
197 &lt;br /&gt;
198 In XCU 2.7.5 (the &lt;&amp; redirect operator) it is stated:&lt;br /&gt;
199 &lt;br /&gt;
200 if the digits in word do not represent a file descriptor already ope…
201 for input, a redirection error shall result;&lt;br /&gt;
202 &lt;br /&gt;
203 Similarly in XCU 2.7.6 (the &gt;&amp; redirect operator):&lt;br /&gt;
204 &lt;br /&gt;
205 if the digits in word do not represent a file descriptor already ope…
206 for output, a redirection error shall result;&lt;br /&gt;
207 &lt;br /&gt;
208 I am unable to find a shell which implements that redirection error, whe…
209 the fd given by word is open, but not for input/output as specified.&lt;…
210 (as the requirement is &quot;error shall result&quot; that means there a…
211 conforming shells, or none I have available to test ... I find it hard t…
212 believe that ksh88 is any different).&lt;br /&gt;
213 &lt;br /&gt;
214 Try:&lt;br /&gt;
215 sh $ exec 4&gt;/tmp/foo; exec 6&lt;&amp;4&lt;br /&gt;
216 sh $ exec 4&lt;/tmp/foo; exec 6&gt;&amp;4&lt;br /&gt;
217 &lt;br /&gt;
218 in your favourite shell and see how many redirection errors you experien…
219 (Errors on the redirect of fd 4 do not count for this purpose, it is eas…
220 to set up a scenario where that redirect fails -- just make that one wor…
221 &lt;br /&gt;
222 This is hardly surprising, as all shells simply use either dup2() or&lt;…
223 fcntl(F_DUPFD) to perform these operations, and as long as the source&lt…
224 fd is open, and there are sufficient available fd's for the new one&lt;b…
225 to be opened (and its fd number is within range) those operations succee…
226 They don't care in the slightest whether the source fd is open for readi…
227 writing, both, or neither.&lt;br /&gt;
228 &lt;br /&gt;
229 Requiring that an error be generated when the source fd is not open for&…
230 the direction of I/O implied by the operator in use, would require the&l…
231 shell to first determine how the source fd was opened (fcntl(F_GETFL)&lt…
232 and verify it - which no-one does - but we would also need to invent a&l…
233 &lt;&gt;&amp; operator (which no-one has done yet) to make sure to be ab…
234 correctly duplicate a file descriptor open for both read and write.&lt;b…
235 &lt;br /&gt;
236 It would be tempting to simply delete the words &quot;for input&quot; an…
237 and leave it like that, but that might lead to a suboptimal result, wher…
238 shells are (effectively) forbidden from generating errors from the examp…
239 code shown above, and while no-one currently does, making it effectively…
240 impossible to ever do, which it would be if applications were told that …
241 makes no difference which fd duplication redirect operator they use, whi…
242 that change would effectively do, is probably not what we want.&lt;br /&…
243 &lt;br /&gt;
244 Instead, I'd make it unspecified what happens if the input duplication&l…
245 operator is applied to a fd not already open for input, or if the output…
246 duplication operator is applied to a fd not already open for output.&lt;…
247 That leaves current shells compliant, puts the onus on applications to&l…
248 do the right thing (which is their only choice right now -- it doesn't&l…
249 matter which duplication operator is applied, what matters is how the&lt…
250 resulting fd is used - it can only be used for operations that were&lt;b…
251 permitted to the source fd (&quot;word&quot;). It leaves it open for a…
252 actually verify correct usage, but such a shell would probably need to&l…
253 invent &lt;&gt;&amp; (in that, or some other, syntax) for fd's open read…
254 <guid>https://www.austingroupbugs.net/view.php?id=1536</guid>
255 <author>kre &lt;[email protected]&gt;</author>
256 <comments>https://www.austingroupbugs.net/view.php?id=1536#bugnotes</com…
257 </item>
258 <item>
259 <title>0001535: Poor description of declaration (all really) utility arg…
260 <link>https://www.austingroupbugs.net/view.php?id=1535</link>
261 <description>XCU 2.9.1.1 (in Issue 8 Draft 2.1) says:&lt;br /&gt;
262 &lt;br /&gt;
263 When a given simple command is required to be executed [...]&lt;br /&…
264 the following expansions, assignments, and redirections shall all &lt…
265 be performed from the beginning of the command text to the end:&lt;br…
266 &lt;br /&gt;
267 All that's relevant about that quote is that it makes the ordering&lt;br…
268 a requirement.&lt;br /&gt;
269 &lt;br /&gt;
270 1. [not relevant here]&lt;br /&gt;
271 2. The words that are not variable assignments or redirections shall…
272 expanded.&lt;br /&gt;
273 &lt;br /&gt;
274 That's simple enough. The first thing we do (after moving redirects&lt…
275 and var-assigns out of the way - that's step 1 - is to expand the remain…
276 words.&lt;br /&gt;
277 &lt;br /&gt;
278 If any fields remain following their expansion, the first field sh…
279 be considered the command name and remaining fields are the argume…
280 for the command.&lt;br /&gt;
281 &lt;br /&gt;
282 This is where we get the command name, and it comes &quot;following thei…
283 words] expansion&quot; (assuming there are remaining fields, which for t…
284 we shall do).&lt;br /&gt;
285 &lt;br /&gt;
286 If the command name is recognized as a declaration utility,&lt;br /…
287 &lt;br /&gt;
288 At this point we look and see if we have a declaration utility, and if&l…
289 we do...&lt;br /&gt;
290 &lt;br /&gt;
291 then any remaining words that would be recognized as a variable&lt;…
292 assignment in isolation shall be expanded as a variable assignment …
293 &lt;br /&gt;
294 then we must look at the remaining (remember already expanded) words to&…
295 see if any look like a variable assignment, and if we find any, expand&l…
296 them *again* (as variable assignments - the following (parenthesised)&lt…
297 text goes into what that means, but that's not relevant here.&lt;br /&gt;
298 &lt;br /&gt;
299 while words that would not be a variable assignment&lt;br /&gt;
300 in isolation shall be subject to regular expansion.&lt;br /&gt;
301 &lt;br /&gt;
302 and the other words also get expanded again, the regular way.&lt;br /&gt;
303 &lt;br /&gt;
304 For all other command names,&lt;br /&gt;
305 &lt;br /&gt;
306 that is, commands that are not declaration utilities&lt;br /&gt;
307 &lt;br /&gt;
308 all subsequent words shall be subject to regular expansion&lt;br /&…
309 &lt;br /&gt;
310 all the remaining words just get regular expansion (this is followed by&…
311 an explanation of what &quot;regular expansion&quot; means - not relevan…
312 except to note in passing that this is the second occurrence of &quot;re…
313 expansion&quot;, the first one didn't get explained - that's probably ba…
314 &lt;br /&gt;
315 That is, the words are expanded, the command name (first non-empty remai…
316 field) gets examined, and depending upon what we see, we expand all the&…
317 other args again in one way or another.&lt;br /&gt;
318 &lt;br /&gt;
319 That's not how it is supposed to happen - not in anyone's world view.&lt…
320 &lt;br /&gt;
321 Further, with this (precisely specified order of processing) this final&…
322 paragraph of 2.9.1.1...&lt;br /&gt;
323 &lt;br /&gt;
324 When determining whether a command name is a declaration utility, an…
325 implementation may use only lexical analysis.&lt;br /&gt;
326 &lt;br /&gt;
327 It isn't really clear what that means, but lexical analysis is occurring…
328 around the same time as alias expansion, so how the two interact would&l…
329 probably need to be made clear, but this probably doesn't matter anyway&…
330 (or not with the current wording) as:&lt;br /&gt;
331 &lt;br /&gt;
332 It is unspecified whether assignment context will be used if the&lt;…
333 command name would only become recognized as a declaration utility&l…
334 after word expansions.&lt;br /&gt;
335 &lt;br /&gt;
336 No it isn't, it is very precisely specified, as above - the word expansi…
337 happen first, and then the result is examined to determine whether the c…
338 name is a declaration utility or not. Nothing even slightly unspecifie…
339 about that, and adding contradictory text here can only confuse things.<…
340 <guid>https://www.austingroupbugs.net/view.php?id=1535</guid>
341 <author>kre &lt;[email protected]&gt;</author>
342 <comments>https://www.austingroupbugs.net/view.php?id=1535#bugnotes</com…
343 </item>
344 <item>
345 <title>0001561: clarify what kind of data shell variables need to be abl…
346 <link>https://www.austingroupbugs.net/view.php?id=1561</link>
347 <description>In:&lt;br /&gt;
348 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
349 &lt;br /&gt;
350 I've raised the question, on which data shell variables are required to …
351 &lt;br /&gt;
352 In various replies following it became clear that there is some ambiguit…
353 &lt;br /&gt;
354 &lt;br /&gt;
355 In:&lt;br /&gt;
356 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
357 Geoff Clare brought up that:&lt;br /&gt;
358 »but POSIX clearly requires that a variable can be&lt;br /&gt;
359 assigned any value obtained from a command substitution that does not&lt…
360 include a NUL byte, and specifies utilities that can be used to&lt;br /&…
361 generate arbitrary byte values, therefore a variable can contain any&lt;…
362 sequence of bytes that does not include a NUL byte.«&lt;br /&gt;
363 &lt;br /&gt;
364 Which AFAIU means that shell variables are expected to hold any bytes ex…
365 &lt;br /&gt;
366 &lt;br /&gt;
367 It was brought up, that e.g. yash discards any bytes from shell variable…
368 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
369 &lt;br /&gt;
370 &lt;br /&gt;
371 In:&lt;br /&gt;
372 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
373 Chet Ramey brought up, that shell variables are initialised from environ…
374 And in the later:&lt;br /&gt;
375 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
376 that:&lt;br /&gt;
377 »applications can obviously put whatever they want into the value of an…
378 &lt;br /&gt;
379 &lt;br /&gt;
380 In:&lt;br /&gt;
381 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
382 Harald van Dijk countered, that:&lt;br /&gt;
383 »That is not what POSIX says. It says &quot;The value of an environment…
384 &lt;br /&gt;
385 &lt;br /&gt;
386 There was some further discussion on whether the definition of command s…
387 One argument brought up was, that there the wording &quot;&lt;newline&gt…
388 (for that particular part see also the proposed clarifications in &lt;a …
389 &lt;br /&gt;
390 &lt;br /&gt;
391 &lt;br /&gt;
392 In:&lt;br /&gt;
393 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
394 I brought up that in addition to what Harald pointed out earlier, in 8.1…
395 »These strings have the form name=value; names shall not contain the&lt…
396 character '='. For values to be portable across systems conforming to&lt…
397 POSIX.1-2017, the value shall be composed of characters from the&lt;br /…
398 portable character set (except NUL and as indicated below).«&lt;br /&gt;
399 &lt;br /&gt;
400 but a bit further down it says the contradicting:&lt;br /&gt;
401 »The values that the environment variables may be assigned are not&lt;b…
402 restricted except that they are considered to end with a null byte and&l…
403 the total space used to store the environment and the arguments to the&l…
404 process is limited to {ARG_MAX} bytes.«&lt;br /&gt;
405 &lt;br /&gt;
406 &lt;br /&gt;
407 And in:&lt;br /&gt;
408 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
409 I brought up:&lt;br /&gt;
410 »3.368 Standard Output&lt;br /&gt;
411 &quot;An output stream usually intended to be used for primary data outp…
412 &lt;br /&gt;
413 And:&lt;br /&gt;
414 3.370 Stream&lt;br /&gt;
415 &quot;Appearing in lowercase, a stream is a file access object that allo…
416 &lt;br /&gt;
417 &lt;br /&gt;
418 This however links to Standard I/O Streams ( &lt;a href=&quot;file:///us…
419 which very well names byte output modes (fputc and so on).«</descriptio…
420 <guid>https://www.austingroupbugs.net/view.php?id=1561</guid>
421 <author>calestyo &lt;[email protected]&gt;</author>
422 <comments>https://www.austingroupbugs.net/view.php?id=1561#bugnotes</com…
423 </item>
424 <item>
425 <title>0001533: struct tm: add tm_gmtoff (and tm_zone) field(s)</title>
426 <link>https://www.austingroupbugs.net/view.php?id=1533</link>
427 <description>Hello.&lt;br /&gt;
428 &lt;br /&gt;
429 Regarding the MUA i maintain i was pinged by a user who needs to&lt;br /…
430 use the timezone Europe/Dublin. He wrote&lt;br /&gt;
431 &lt;br /&gt;
432 In 2018, the tzdata maintainers (IANA) corrected a historical mist…
433 with the Europe/Dublin timezone. The mistake was rooted in a&lt;br…
434 misunderstanding of whether IST meant &quot;Irish Summer Time&quot…
435 Standard Time&quot;.&lt;br /&gt;
436 &lt;br /&gt;
437 The problem was discussed at great length&lt;br /&gt;
438 (&lt;a href=&quot;http://mm.icann.org/pipermail/tz/2018-January/th…
439 concluded that IST really meant Irish *Standard* Time (in constras…
440 with, say, British *Summer* Time), and that this standard time is&…
441 defined as UTC+0100.&lt;br /&gt;
442 [.]&lt;br /&gt;
443 Once the question was settled, the only possible solution for keep…
444 the Irish local time in sync with the rest of the world (for examp…
445 Belfast &amp; London) was for IANA to _reverse_ the functioning of…
446 flag for Ireland. The result is that in the current IANA timezone&…
447 database (2021e), Europe/Dublin has DST applied in *winter*, with …
448 adjustment of -1h (that is, negative).&lt;br /&gt;
449 [.]&lt;br /&gt;
450 It turns out that the introduction of a negative DST adjustment ca…
451 all sorts of bugs back in 2018; in the source distribution of IANA…
452 tzdata, one can spot this inside ./europe:&lt;br /&gt;
453 &lt;br /&gt;
454 # In January 2018 we discovered that the negative SAVE values in…
455 # Eire rules cause problems with tests for ICU [...] and with te…
456 # for OpenJDK [...]&lt;br /&gt;
457 # To work around this problem, the build procedure can translate…
458 # following data into two forms, one with negative SAVE values a…
459 # other form with a traditional approximation for Irish timestam…
460 # after 1971-10-31 02:00 UTC; although this approximation has tm…
461 # flags that are reversed, its UTC offsets are correct and this …
462 # suffices. This source file currently uses only nonnegative SA…
463 # values, but this is intended to change and downstream code sho…
464 # not rely on it.&lt;br /&gt;
465 &lt;br /&gt;
466 So, a temporary hack was put in place in order to allow distro&lt;…
467 maintainers to retain the old broken convention of IST and support…
468 buggy software, but it is clear that the current (and technically,…
469 politically, correct) implementation of a negative DST adjustment …
470 Ireland is there to stay.&lt;br /&gt;
471 As a matter of fact, the distro maintainer can choose to compile&l…
472 tzdata to keep buggy software happy (&quot;make DATAFORM=rearguard…
473 which replicates the behaviour of tzdata prior to 2018. Many distr…
474 seem to be doing that for one reason or another, while some have p…
475 the upstream change down to their users (probably, without knowing…
476 &lt;br /&gt;
477 Anyhow, all the simple minded software, including the MUA&lt;br /&gt;
478 i maintain, used to do something like&lt;br /&gt;
479 &lt;br /&gt;
480 if((t2 = mktime(gmtime(&amp;t))) == (time_t)-1){&lt;br /&gt;
481 t = 0;&lt;br /&gt;
482 goto jredo;&lt;br /&gt;
483 }&lt;br /&gt;
484 tzdiff = t - t2;&lt;br /&gt;
485 if((tmp = localtime(&amp;t)) == NULL){&lt;br /&gt;
486 t = 0;&lt;br /&gt;
487 goto jredo;&lt;br /&gt;
488 }&lt;br /&gt;
489 &lt;br /&gt;
490 tzdiff_hour = (int)(tzdiff / 60);&lt;br /&gt;
491 tzdiff_min = tzdiff_hour % 60;&lt;br /&gt;
492 tzdiff_hour /= 60;&lt;br /&gt;
493 if (tmp-&gt;tm_isdst &gt; 0)&lt;br /&gt;
494 tzdiff_hour++;&lt;br /&gt;
495 &lt;br /&gt;
496 Note the .tm_isdst plus positive summer time adjustment.&lt;br /&gt;
497 This was overly primitive, and i recognize that POSIX supports the&lt;br…
498 %z (and %Z) formats for strftime(3), and in general code as below&lt;br …
499 is used by projects, so doing it right is very expensive but&lt;br /&gt;
500 doable with POSIX as of today.&lt;br /&gt;
501 &lt;br /&gt;
502 However, all BSDs and Linux with either of GNU and musl C library&lt;br …
503 support the .tm_gmtoff (and .tm_zone) members of &quot;struct tm&quot;, …
504 general all users of the public domain (and standardized) IANA TZ&lt;br …
505 project can bake it in upon their own desire.. With .tm_gmtoff&lt;br /&…
506 being available, code gets as simple as&lt;br /&gt;
507 s64&lt;br /&gt;
508 time_tzdiff(s64 secsepoch, struct tm const *utcp_or_nil,&lt;br /&gt;
509 struct tm const *localp_or_nil){&lt;br /&gt;
510 struct tm tmbuf[2], *tmx;&lt;br /&gt;
511 time_t t;&lt;br /&gt;
512 s64 rv;&lt;br /&gt;
513 UNUSED(utcp_or_nil);&lt;br /&gt;
514 &lt;br /&gt;
515 rv = 0;&lt;br /&gt;
516 &lt;br /&gt;
517 if(localp_or_nil == NIL){&lt;br /&gt;
518 t = S(time_t,secsepoch);&lt;br /&gt;
519 while((tmx = localtime(&amp;t)) == NIL){&lt;br /&gt;
520 if(t == 0)&lt;br /&gt;
521 goto jleave;&lt;br /&gt;
522 t = 0;&lt;br /&gt;
523 }&lt;br /&gt;
524 tmbuf[0] = *tmx;&lt;br /&gt;
525 localp_or_nil = &amp;tmbuf[0];&lt;br /&gt;
526 }&lt;br /&gt;
527 &lt;br /&gt;
528 #ifdef HAVE_TM_GMTOFF&lt;br /&gt;
529 rv = localp_or_nil-&gt;tm_gmtoff;&lt;br /&gt;
530 &lt;br /&gt;
531 #else&lt;br /&gt;
532 if(utcp_or_nil == NIL){&lt;br /&gt;
533 t = S(time_t,secsepoch);&lt;br /&gt;
534 while((tmx = gmtime(&amp;t)) == NIL){&lt;br /&gt;
535 if(t == 0)&lt;br /&gt;
536 goto jleave;&lt;br /&gt;
537 t = 0;&lt;br /&gt;
538 }&lt;br /&gt;
539 tmbuf[1] = *tmx;&lt;br /&gt;
540 utcp_or_nil = &amp;tmbuf[1];&lt;br /&gt;
541 }&lt;br /&gt;
542 &lt;br /&gt;
543 rv = ((((localp_or_nil-&gt;tm_hour - utcp_or_nil-&gt;tm_hour) * 60)…
544 (localp_or_nil-&gt;tm_min - utcp_or_nil-&gt;tm_min)) * 60) +&…
545 (localp_or_nil-&gt;tm_sec - utcp_or_nil-&gt;tm_sec);&lt;br /&…
546 &lt;br /&gt;
547 if((t = (localp_or_nil-&gt;tm_yday - utcp_or_nil-&gt;tm_yday)) != 0…
548 s64 const ds = 24 * 60 * 60;&lt;br /&gt;
549 &lt;br /&gt;
550 rv += (t == 1) ? ds : -S(s64,ds);&lt;br /&gt;
551 }&lt;br /&gt;
552 #endif&lt;br /&gt;
553 &lt;br /&gt;
554 jleave:&lt;br /&gt;
555 return rv;&lt;br /&gt;
556 }</description>
557 <guid>https://www.austingroupbugs.net/view.php?id=1533</guid>
558 <author>steffen &lt;[email protected]&gt;</author>
559 <comments>https://www.austingroupbugs.net/view.php?id=1533#bugnotes</com…
560 </item>
561 <item>
562 <title>0001528: mailx: document &quot;sh(1) -c --&quot; has to be used i…
563 <link>https://www.austingroupbugs.net/view.php?id=1528</link>
564 <description>mailx(1) specific follow-up to issue #1440.&lt;br /&gt;
565 &lt;br /&gt;
566 P.S.: page numbers and line numbers from C181. (I think this is not the …
567 <guid>https://www.austingroupbugs.net/view.php?id=1528</guid>
568 <author>steffen &lt;[email protected]&gt;</author>
569 <comments>https://www.austingroupbugs.net/view.php?id=1528#bugnotes</com…
570 </item>
571 <item>
572 <title>0001527: cd requires the impossible on standard output</title>
573 <link>https://www.austingroupbugs.net/view.php?id=1527</link>
574 <description>The STDOUT section of XCU 4(cd) says:&lt;br /&gt;
575 &lt;br /&gt;
576 If a non-empty directory name from CDPATH is used, or if cd - is us…
577 an absolute pathname of the new working directory shall be written …
578 the standard output as follows:&lt;br /&gt;
579 &lt;br /&gt;
580 Whether used as cd -P, or the ludicrous cd -L, this requires what might&…
581 be impossible.&lt;br /&gt;
582 &lt;br /&gt;
583 From XCU 2.5.3 (shell vars):&lt;br /&gt;
584 PWD Set by the shell and by the cd utility. [...]&lt;br /&gt;
585 if there is insufficient permission on the current working&lt;…
586 directory, or on any parent of that directory, to determine&lt…
587 what that pathname would be, the value of PWD is unspecified&l…
588 &lt;br /&gt;
589 So the standard clearly recognises that it is not always possioble to&lt…
590 determine the current working directory, which results in PWD being unsp…
591 but not in unspecified behaviour from cd or pwd (that's only if the user…
592 modifies PWD).&lt;br /&gt;
593 &lt;br /&gt;
594 Further, while not exactly common, nor is this a very rare event, it hap…
595 from time to time, and is usually easily corrected by a simple cd to a f…
596 qualified path (one which works) which will result in establishing a val…
597 for PWD, after which all is normal (which would not be able to be truste…
598 the behaviour of cd was unspecified at that point).&lt;br /&gt;
599 &lt;br /&gt;
600 In that state, if the user successfully does:&lt;br /&gt;
601 &lt;br /&gt;
602 mkdir foo foo/bar&lt;br /&gt;
603 export CDPATH=foo&lt;br /&gt;
604 cd bar&lt;br /&gt;
605 &lt;br /&gt;
606 the text quoted above requires the cd command to print the full path&lt;…
607 /impossible/to/discover/foo/bar&lt;br /&gt;
608 which, of course, is impossible to do correctly.&lt;br /&gt;
609 &lt;br /&gt;
610 It is possible to get into this state after the shell has started (and …
611 is set) as well, though in that case it is typically only cd -P which ha…
612 problem (the shell just &quot;knows&quot; that $PWD is correct, and all …
613 it is some string manipulation in the cd -L case ... but not always true…
614 as the filesystem may have altered state after PWD was set.)&lt;br /&gt;
615 &lt;br /&gt;
616 What shells do in this situation varies. Some print an error or warnin…
617 which they're not supposed to do, as &quot;The standard error shall be u…
618 for diagnostic messages.&quot; and that means (according to XCU 1.4) tha…
619 exit status must indicate an error, but for cd (at least without the not…
620 yet existing -e option) when cd has changed directory successfully, it m…
621 exit 0 (-e doesn't solve the problem for cd -L with PWD unset, and no&lt…
622 ability to discover a path of the current working directory anyway, so i…
623 is irrelevant here).&lt;br /&gt;
624 &lt;br /&gt;
625 Aside from the technically incorrect error message that is sometimes pri…
626 most shells print the (adjusted) relative path (which is what it usually…
627 not always, is in these cases) that was used in the chdir() call. In t…
628 example above that would be &quot;foo/bar&quot; - not an absolute path b…
629 (zsh almost does that, at least in the copy I have currently, but preten…
630 is an absolute path by prepending a '/' - /foo/bar - which is nonsense, …
631 most probably simply a bug). Other shells simply print nothing in this…
632 &lt;br /&gt;
633 In the case that PWD is set, and cd -P is used, and the resulting direct…
634 path cannot be determined, yash seems to treat it something like cd -L, …
635 PWD as if it were the correct physical path, and adjusting it. The res…
636 an absolute path, and in one case I saw it, was actually correct. There…
637 no way yash could have known that however - it was a guess (even if a we…
638 educated one).&lt;br /&gt;
639 &lt;br /&gt;
640 Since the behaviour of the existing shells varies so much, I suspect tha…
641 that it is possible to say in this situation is that the results are uns…
642 (though there the existence of -e in issue8 might make a difference).&lt…
643 &lt;br /&gt;
644 Whether it is also desirable to explicitly allow shells to issue an erro…
645 this situation I will leave for future discussion (my shell does not...)…
646 <guid>https://www.austingroupbugs.net/view.php?id=1527</guid>
647 <author>kre &lt;[email protected]&gt;</author>
648 <comments>https://www.austingroupbugs.net/view.php?id=1527#bugnotes</com…
649 </item>
650 <item>
651 <title>0001525: only the close() of the last fd for a socket should dest…
652 <link>https://www.austingroupbugs.net/view.php?id=1525</link>
653 <description>The description of close() repeatedly says that various act…
654 &lt;br /&gt;
655 &quot;When all file descriptors associated with a pipe or FIFO special f…
656 &lt;br /&gt;
657 &quot;When all file descriptors associated with an open file description…
658 &lt;br /&gt;
659 &quot;The last close() for a STREAM...&quot;&lt;br /&gt;
660 &lt;br /&gt;
661 &quot;If fildes refers to the master side of a pseudo-terminal, and this…
662 &lt;br /&gt;
663 But it does not say that for sockets: &quot;If fildes refers to a socket…
664 <guid>https://www.austingroupbugs.net/view.php?id=1525</guid>
665 <author>ben_pfaff &lt;[email protected]&gt;</author>
666 <comments>https://www.austingroupbugs.net/view.php?id=1525#bugnotes</com…
667 </item>
668 <item>
669 <title>0001523: Wrong layout of getopt &quot;-&quot;</title>
670 <link>https://www.austingroupbugs.net/view.php?id=1523</link>
671 <description>&gt; If, when getopt() is called:&lt;br /&gt;
672 &gt;&lt;br /&gt;
673 &gt; argv[optind] is a null pointer*argv[optind] is not the character …
674 &gt; argv[optind] points to the string &quot;-&quot;&lt;br /&gt;
675 &lt;br /&gt;
676 I didn't understand the above excerpt, even after reading it multiple ti…
677 &lt;br /&gt;
678 My misunderstanding was due to the missing line break before the first '…
679 <guid>https://www.austingroupbugs.net/view.php?id=1523</guid>
680 <author>rillig &lt;[email protected]&gt;</author>
681 <comments>https://www.austingroupbugs.net/view.php?id=1523#bugnotes</com…
682 </item>
683 <item>
684 <title>0001522: mkdir() and S_ISVTX</title>
685 <link>https://www.austingroupbugs.net/view.php?id=1522</link>
686 <description>The mkdir() description states:&lt;blockquote&gt;When bits …
687 &lt;br /&gt;
688 The umask() page also has a similar problem.</description>
689 <guid>https://www.austingroupbugs.net/view.php?id=1522</guid>
690 <author>geoffclare &lt;[email protected]&gt;</author>
691 <comments>https://www.austingroupbugs.net/view.php?id=1522#bugnotes</com…
692 </item>
693 <item>
694 <title>0001505: Make doesn't seem to specify unset macro expansion behav…
695 <link>https://www.austingroupbugs.net/view.php?id=1505</link>
696 <description>Hello,&lt;br /&gt;
697 &lt;br /&gt;
698 I was looking for an actual specification of&lt;br /&gt;
699 what happens when trying to expand an undefined macro.&lt;br /&gt;
700 &lt;br /&gt;
701 Intuition would be that it expands to an empty string,&lt;br /&gt;
702 but this doesn't seem to be specified at all,&lt;br /&gt;
703 or maybe I missed that somewhere else.&lt;br /&gt;
704 &lt;br /&gt;
705 Could an implementation be allowed&lt;br /&gt;
706 to generate an error on such case (or other behaviour)&lt;br /&gt;
707 without having this defined?</description>
708 <guid>https://www.austingroupbugs.net/view.php?id=1505</guid>
709 <author>quinq &lt;[email protected]&gt;</author>
710 <comments>https://www.austingroupbugs.net/view.php?id=1505#bugnotes</com…
711 </item>
712 <item>
713 <title>0001036: Errors/Omissions in specification of here document redir…
714 <link>https://www.austingroupbugs.net/view.php?id=1036</link>
715 <description>Aside from the question of just which newline is the &quot;…
716 has been canvassed (without resolution I can see) elsewhere, there are&l…
717 several problems with the specification of here documents.&lt;br /&gt;
718 &lt;br /&gt;
719 First, given that the here doc is processed after encountering a newline…
720 (which newline is the other issue) they must be largely processed as a s…
721 effect of lexical processing (as newlines, other than those that happen …
722 served as token delimiters, and are not otherwise relevant. This would…
723 that the here document is processed during lexical analysis - and nothin…
724 specification contradicts that. The spec does say that (given an unquo…
725 delimiter word, the text is subject to various expansions. It does not …
726 is never used because it is attached to a command that is never executed…
727 &lt;br /&gt;
728 Second, the text says ...&lt;br /&gt;
729 &lt;br /&gt;
730 If any character in word is quoted, the delimiter shall be...&lt;b…
731 &lt;br /&gt;
732 and in the following paragraph ...&lt;br /&gt;
733 &lt;br /&gt;
734 If no characters in word are quoted, all lines of the ...&lt;br /&…
735 &lt;br /&gt;
736 but I do not believe that is what is intended, and is not what is actual…
737 implemented in any shell I can find. Consider ...&lt;br /&gt;
738 &lt;br /&gt;
739 cat &lt;&lt; &quot;&quot;EOF&lt;br /&gt;
740 lines of text&lt;br /&gt;
741 EOF&lt;br /&gt;
742 &lt;br /&gt;
743 The delimiter there is the string EOF in which none of the characters we…
744 &lt;br /&gt;
745 Third, in cases where expansions are done, nothing makes it explicit tha…
746 following, there is one here document that happens to contain the string…
747 echo foo &lt;&lt; EOF&lt;br /&gt;
748 and not two here documents&lt;br /&gt;
749 &lt;br /&gt;
750 end=EOF&lt;br /&gt;
751 cat &lt;&lt;EOF&lt;br /&gt;
752 lines of text&lt;br /&gt;
753 $end&lt;br /&gt;
754 echo foo &lt;&lt;EOF&lt;br /&gt;
755 another line&lt;br /&gt;
756 EOF&lt;br /&gt;
757 &lt;br /&gt;
758 Of course, if the first question above is resolved to make it clear that…
759 &lt;br /&gt;
760 Fourth, I am totally confused by the relationship between double quoting…
761 backtick command expansions, section 2.2.3 appears to say that if backti…
762 The relevance of this to here documents is illustrated by the following …
763 &lt;br /&gt;
764 echo &quot;` cat &lt;&lt; EOF&lt;br /&gt;
765 X = $(( 1 + 2 ))&lt;br /&gt;
766 EOF&lt;br /&gt;
767 `&quot;&lt;br /&gt;
768 &lt;br /&gt;
769 If things are as I have postulated, then the EOF is quoted (by the doubl…
770 quotes that surround the command substitution) and hence the here docume…
771 should not be expanded, and echo should (eventually) output&lt;br /&gt;
772 &lt;br /&gt;
773 X = $(( 1 + 2 ))&lt;br /&gt;
774 &lt;br /&gt;
775 and not&lt;br /&gt;
776 &lt;br /&gt;
777 X = 3&lt;br /&gt;
778 &lt;br /&gt;
779 but again, I do not believe this is in accordance with what any shell do…
780 This again may be an artifact of the 2nd point above, and if the text is…
781 &lt;br /&gt;
782 Fifth, and more minor I think, when the delimiter is not quoted,&lt;br /…
783 the text states that backslashes work the way they do in double quoted s…
784 two character string). But then (back to 2.7.4) the text goes on to say…
785 inside the here document &quot; is not special. The problem is that it…
786 clear whether \ continues to act as a quote character when followed by t…
787 &lt;br /&gt;
788 Sixth, and perhaps most important of all, there is no discussion of what…
789 delimiter, and go ahead and execute whatever command the here document w…
790 shell eats the entire rest of the script as the here document because of…
791 where it would have with tab EOF.)</description>
792 <guid>https://www.austingroupbugs.net/view.php?id=1036</guid>
793 <author>kre &lt;[email protected]&gt;</author>
794 <comments>https://www.austingroupbugs.net/view.php?id=1036#bugnotes</com…
795 </item>
796 <item>
797 <title>0001532: &quot;stty -g&quot; output should not have to be split</…
798 <link>https://www.austingroupbugs.net/view.php?id=1532</link>
799 <description>The resolution of &lt;a href=&quot;https://www.austingroupb…
800 &lt;br /&gt;
801 -g&lt;br /&gt;
802 &lt;br /&gt;
803 Write to standard output all the current settings in an&lt;br /&gt;
804 unspecified form that can be used as arguments to another&lt;br /&gt;
805 invocation of the stty utility on the same system. The form&lt;br /&…
806 used shall not contain any characters that would require&lt;br /&gt;
807 quoting to avoid word expansion by the shell; see Section&lt;br /&gt;
808 2.6 (on page 2353).&lt;br /&gt;
809 &lt;br /&gt;
810 to:&lt;br /&gt;
811 &lt;br /&gt;
812 -g&lt;br /&gt;
813 &lt;br /&gt;
814 Write to standard output all the current settings,&lt;br /&gt;
815 optionally excluding the terminal window size, in an&lt;br /&gt;
816 unspecified form that, when used as arguments to another&lt;br /&gt;
817 invocation of the stty utility on the same system, attempts&lt;br /&…
818 to apply those settings to the terminal. The form used shall&lt;br /…
819 not contain any sequence that would form an Informational&lt;br /&gt;
820 Query, nor any characters that would require quoting to&lt;br /&gt;
821 avoid word expansions, other than field splitting, by the&lt;br /&gt;
822 shell; see Section 2.6 (on page 2353).&lt;br /&gt;
823 &lt;br /&gt;
824 While the 2018 edition had:&lt;br /&gt;
825 &lt;br /&gt;
826 -g&lt;br /&gt;
827 Write to standard output all the current settings in an&lt;br /&gt;
828 unspecified form that can be used as arguments to another&lt;br /&gt;
829 invocation of the stty utility on the same system. The form&lt;br /&…
830 used shall not contain any characters that would require&lt;br /&gt;
831 quoting to avoid word expansion by the shell; see wordexp.&lt;br /&g…
832 &lt;br /&gt;
833 It's one stream of bytes that applications send to standard output.&lt;b…
834 &lt;br /&gt;
835 For that stream of bytes to be &quot;used as argument*S* to another&lt;b…
836 invocation of the stty utility&quot;, it implies that that output should…
837 somehow be split into a list of arguments (and also implies the&lt;br /&…
838 result fits in the ARG_MAX limit and doesn't contain NUL bytes).&lt;br /…
839 &lt;br /&gt;
840 The reference to 2.6 suggests maybe &quot;sh&quot; should be involved to…
841 perform that splitting. It almost suggests that the output&lt;br /&gt;
842 should be appended to &quot;stty &quot;, or possibly &quot;stty -- &quot…
843 sh as in (printf &quot;stty -- &quot;; stty -g) | sh&lt;br /&gt;
844 &lt;br /&gt;
845 AFAIK, stty -g was introduced in SysIII circa 1980. It was&lt;br /&gt;
846 outputting on word on one line made of a &quot;:&quot;-separated of alnu…
847 from the portable charset and followed by a newline character.&lt;br /&g…
848 After it was specified by POSIX, it was also added to BSDs (some&lt;br /…
849 4.3 variant), with &quot;=&quot; in the list of characters that may occu…
850 (not in leading position) in the &quot;:&quot;-delimited list.&lt;br /&g…
851 GNU stty has used a format similar to SysIII from at least as&lt;br /&gt;
852 far back as 1990.&lt;br /&gt;
853 &lt;br /&gt;
854 The way to save and restore it was always to store that output&lt;br /&g…
855 without the trailing newline characters, which in a shell can be&lt;br /…
856 done with:&lt;br /&gt;
857 &lt;br /&gt;
858 saveterm=$(stty -g)&lt;br /&gt;
859 &lt;br /&gt;
860 And to restore it:&lt;br /&gt;
861 &lt;br /&gt;
862 stty &quot;$saveterm&quot;&lt;br /&gt;
863 &lt;br /&gt;
864 The &quot;--&quot; being unnecessary because the output of stty -g never…
865 starts with &quot;-&quot; and with some (including GNU stty) not allowed…
866 &lt;br /&gt;
867 All the documentations of stty I've seen talk of *one* (an)&lt;br /&gt;
868 argument to be passed to stty. They don't say the output may&lt;br /&gt;
869 (let alone should) be split in any way to be passed as several&lt;br /&g…
870 arguments to stty.&lt;br /&gt;
871 &lt;br /&gt;
872 In the unlikely event that there are indeed stty implementations&lt;br /…
873 that require the output of stty -g to be split into arguments&lt;br /&gt;
874 before being fed back to stty, we'd need to specify how those&lt;br /&gt;
875 are meant to be split.</description>
876 <guid>https://www.austingroupbugs.net/view.php?id=1532</guid>
877 <author>stephane &lt;[email protected]&gt;</author>
878 <comments>https://www.austingroupbugs.net/view.php?id=1532#bugnotes</com…
879 </item>
880 <item>
881 <title>0001557: Better wording to describe FD_CLOEXEC.</title>
882 <link>https://www.austingroupbugs.net/view.php?id=1557</link>
883 <description>The current wording for FD_CLOEXEC in open is:&lt;br /&gt;
884 &lt;br /&gt;
885 &gt; The FD_CLOEXEC file descriptor flag &lt;br /&gt;
886 &gt; associated with the new file descriptor&lt;br /&gt;
887 &gt; shall be cleared unless the &lt;br /&gt;
888 &gt; O_CLOEXEC flag is set in oflag.&lt;br /&gt;
889 &lt;br /&gt;
890 It as a grammatical ambiguity as to whether FD_CLOEXEC is set if O_CLOEX…
891 <guid>https://www.austingroupbugs.net/view.php?id=1557</guid>
892 <author>dannyniu &lt;[email protected]&gt;</author>
893 <comments>https://www.austingroupbugs.net/view.php?id=1557#bugnotes</com…
894 </item>
895 <item>
896 <title>0001551: sed: ambiguities in the how BREs/EREs are parsed/interpr…
897 <link>https://www.austingroupbugs.net/view.php?id=1551</link>
898 <description>Hey.&lt;br /&gt;
899 &lt;br /&gt;
900 First of all, I've asked/reported all his already at the mailing list:&l…
901 &quot;sed and delimiters that are also special characters to REs&quot;&l…
902 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
903 (unfortunately there seems to be no thread-view)&lt;br /&gt;
904 &lt;br /&gt;
905 So far, no one could really answer the core questions (or if I just didn…
906 &lt;br /&gt;
907 &lt;br /&gt;
908 I was looking into using BREs/EREs within delimiters, which as far as PO…
909 - context addresses (e.g. /RE/ or \xREx with x being another delimiter, …
910 - s-command&lt;br /&gt;
911 &lt;br /&gt;
912 &lt;br /&gt;
913 (I made another ticket (&lt;a href=&quot;https://www.austingroupbugs.net…
914 &lt;br /&gt;
915 &lt;br /&gt;
916 This ticket covers presumed ambiguities in:&lt;br /&gt;
917 When BREs/EREs are used within delimiters...&lt;br /&gt;
918 AND&lt;br /&gt;
919 ... the delimiter is a special character (or a character that would be s…
920 (in the above 3 cases, though in my examples I use only the s-command).&…
921 &lt;br /&gt;
922 &lt;br /&gt;
923 &lt;br /&gt;
924 As far as I can see, the documentation says with respect to the delimite…
925 &lt;br /&gt;
926 [1] »If the character designated by c appears following a &lt;backslash…
927 (line 106088 et seq., in the draft)&lt;br /&gt;
928 &lt;br /&gt;
929 [ii] »Within the RE and the replacement, the RE delimiter itself can be…
930 as a literal character if it is preceded by a &lt;backslash&gt;.«&lt;br…
931 (line 106204 et seq., in the draft)&lt;br /&gt;
932 &lt;br /&gt;
933 [iii] for the s-command:&lt;br /&gt;
934 »Any character other than &lt;backslash&gt; or &lt;newline&gt; can be u…
935 (line 106202 et seq., in the draft)&lt;br /&gt;
936 &lt;br /&gt;
937 &lt;br /&gt;
938 &lt;br /&gt;
939 IMO, that leaves open a number of questions and ambiguities:&lt;br /&gt;
940 &lt;br /&gt;
941 &lt;br /&gt;
942 &lt;br /&gt;
943 1) How are strings/commands which delimiters actually parsed (or split u…
944 &lt;br /&gt;
945 Consider the following example:&lt;br /&gt;
946 s(\\((X(&lt;br /&gt;
947 &lt;br /&gt;
948 &lt;br /&gt;
949 There are IMO at least two ways to parse that:&lt;br /&gt;
950 &lt;br /&gt;
951 a) two stages&lt;br /&gt;
952 - 1st: splitting up into RE an replacement parts first by going through …
953 - 2nd: taking the two parts (RE and replacement) and unquote any quoted …
954 RE-part = \\(&lt;br /&gt;
955 replacement-part = X&lt;br /&gt;
956 unquoted:&lt;br /&gt;
957 RE-part = \( (here the \( became a ( with respect to the RE)&lt;br…
958 replacement-part = X&lt;br /&gt;
959 &lt;br /&gt;
960 now parse the RE \( as usual... assuming a BRE we'd end up with \( as th…
961 &lt;br /&gt;
962 So effectively here we'd get:&lt;br /&gt;
963 s/\(/X/&lt;br /&gt;
964 =&gt; would as such be an error, but there could have of course been a '…
965 &lt;br /&gt;
966 &lt;br /&gt;
967 b) one stage&lt;br /&gt;
968 going from left to right applying the varying rules (for REs and delimit…
969 s( ah, an s command with ( as delimiter&lt;br /&gt;
970 \\ parser first sees these, makes them a literal \&lt;br /&gt;
971 (( ah, the 2nd and 3rd delimiter&lt;br /&gt;
972 X( flags to the s command&lt;br /&gt;
973 =&gt; would likely be an error, given the unknown flags&lt;br /&gt;
974 &lt;br /&gt;
975 &lt;br /&gt;
976 I couldn't find any place, where it really says clearly (or unclearly) h…
977 Just because (b) seems the more logical way to do it, doesn't make it ma…
978 &lt;br /&gt;
979 Especially, (a) doesn't seem to be ruled out, take [i], [ii], [iii] whic…
980 &quot;if the delimiter is preceded by \ THAT BY ITSELF IS NOT ESCAPED&qu…
981 &lt;br /&gt;
982 And both ways (and there might be more crazy ways to do it ;-) )... prod…
983 &lt;br /&gt;
984 &lt;br /&gt;
985 &lt;br /&gt;
986 &lt;br /&gt;
987 2) What if the delimiter is a special character (assuming BREs here).&lt…
988 &lt;br /&gt;
989 [i], [ii], [iii] all effectively say, that if the delimiter is preceded …
990 &lt;br /&gt;
991 &lt;br /&gt;
992 a) What does »literally« mean here?&lt;br /&gt;
993 - It's not taken as a delimiter, but &quot;directly&quot; used as RE?&lt…
994 So if one has:&lt;br /&gt;
995 s.\..X.&lt;br /&gt;
996 it would be used as:&lt;br /&gt;
997 s/./X/&lt;br /&gt;
998 (btw, this is what GNU sed does:&lt;br /&gt;
999 $ printf '%s\n' '.' | sed 's.\..X.'&lt;br /&gt;
1000 X&lt;br /&gt;
1001 $ printf '%s\n' 'v' | sed 's.\..X.'&lt;br /&gt;
1002 X&lt;br /&gt;
1003 )&lt;br /&gt;
1004 &lt;br /&gt;
1005 or:&lt;br /&gt;
1006 &lt;br /&gt;
1007 - It's not taken as delimiter AND in RE context it would also be literal…
1008 So if one has:&lt;br /&gt;
1009 s.\..X.&lt;br /&gt;
1010 it would be used as:&lt;br /&gt;
1011 s/\./X/&lt;br /&gt;
1012 (btw, this is what BusyBox sed does:&lt;br /&gt;
1013 printf '%s\n' '.' | busybox sed 's.\..X.'&lt;br /&gt;
1014 X&lt;br /&gt;
1015 $ printf '%s\n' 'v' | busybox sed 's.\..X.'&lt;br /&gt;
1016 v&lt;br /&gt;
1017 )&lt;br /&gt;
1018 &lt;br /&gt;
1019 And again, as above, the standard says &quot;if the delimiter is precede…
1020 &lt;br /&gt;
1021 =&gt; The standard should clarify this ambiguity, given that two widely …
1022 And if it's undefined, the standard should also mention that (and probab…
1023 &lt;br /&gt;
1024 &lt;br /&gt;
1025 b) Depending on the answer of (2a), there isn't any mentioning on whethe…
1026 &lt;br /&gt;
1027 In both cases, the question would arise:&lt;br /&gt;
1028 Other than using a more sane delimiter ;-) ...&lt;br /&gt;
1029 &lt;br /&gt;
1030 - »literally« means, it's no longer a delimiter, but other than that g…
1031 then: s.\..X. would be effectively s/./X/&lt;br /&gt;
1032 ... can I get the literal . here and if so how?&lt;br /&gt;
1033 &lt;br /&gt;
1034 - »literally« means, literal even with respect to the RE:&lt;br /&gt;
1035 then: s.\..X. would be effectively s/\./X/&lt;br /&gt;
1036 ... can I get the special meaning . here and if so how?&lt;br /&gt;
1037 &lt;br /&gt;
1038 =&gt; even if it's simply not possibly do get the other meaning (whichev…
1039 &lt;br /&gt;
1040 &lt;br /&gt;
1041 c) (2a) and (2b) also affect characters that get their special meaning (…
1042 &lt;br /&gt;
1043 Consider:&lt;br /&gt;
1044 s(\((X(&lt;br /&gt;
1045 &lt;br /&gt;
1046 Unlike above in (1) (where s(\\((X( ) was used, there is no parsing amb…
1047 s/&lt;something&gt;/X/&lt;br /&gt;
1048 &lt;br /&gt;
1049 Again, for &lt;something&gt; the question from (2a) comes up:&lt;br /&gt;
1050 What does the RE see?&lt;br /&gt;
1051 - ( (the literal ( )&lt;br /&gt;
1052 (btw, this is what GNU sed does:&lt;br /&gt;
1053 $ printf '%s\n' '(' | sed 's(\((X('&lt;br /&gt;
1054 X&lt;br /&gt;
1055 $ printf '%s\n' 'v' | sed 's(\((X('&lt;br /&gt;
1056 v&lt;br /&gt;
1057 )&lt;br /&gt;
1058 &lt;br /&gt;
1059 or:&lt;br /&gt;
1060 - \( (the sequence \( which starts a subpattern)&lt;br /&gt;
1061 (I know the resulting RE would lack a closing '\)' and something within …
1062 subexpression ... but that could be easily added.)&lt;br /&gt;
1063 (btw, this is what BusyBox sed does:&lt;br /&gt;
1064 $ printf '%s\n' 'anything' | busybox sed 's(\((X('&lt;br /&gt;
1065 sed: bad regex '\(': Unmatched ( or \(&lt;br /&gt;
1066 )&lt;br /&gt;
1067 &lt;br /&gt;
1068 &lt;br /&gt;
1069 So as one can see, the same questions as in (2a) and (2b) pop up for suc…
1070 &lt;br /&gt;
1071 &lt;br /&gt;
1072 &lt;br /&gt;
1073 d) I found that e.g. GNU's sed (which (2a) uses the quoted delimiter tha…
1074 s.[.].X.&lt;br /&gt;
1075 which seems then to be used (by GNU sed) as:&lt;br /&gt;
1076 s/[.]/X/&lt;br /&gt;
1077 &lt;br /&gt;
1078 But again, at least to me the standard seems to be ambiguous with&lt;br …
1079 respect to how the original form should be parsed (see point (1) above).…
1080 &lt;br /&gt;
1081 While the bracket expression itself is defined to take the . inside&lt;b…
1082 literally, POSIX nowhere seems to say that this is even to be seen as a&…
1083 '.' for the RE and not as the 2nd delimiter.&lt;br /&gt;
1084 &lt;br /&gt;
1085 Instead, (i), (ii) and (iii) rather seem to imply, that because the (2nd…
1086 &lt;br /&gt;
1087 (GNU sed:&lt;br /&gt;
1088 $ printf '%s\n' '.' | sed 's.[.].X.'&lt;br /&gt;
1089 X&lt;br /&gt;
1090 $ printf '%s\n' 'v' | sed 's.[.].X.'&lt;br /&gt;
1091 v&lt;br /&gt;
1092 )&lt;br /&gt;
1093 &lt;br /&gt;
1094 (BusyBox sed also works like that:&lt;br /&gt;
1095 $ printf '%s\n' '.' | busybox sed 's.[.].X.'&lt;br /&gt;
1096 X&lt;br /&gt;
1097 $ printf '%s\n' 'v' | busybox sed 's.[.].X.'&lt;br /&gt;
1098 v&lt;br /&gt;
1099 but since BusyBox sed anyway seems to tread the quoted delimiter \. as l…
1100 $ printf '%s\n' '.' | busybox sed 's.\..X.'&lt;br /&gt;
1101 X&lt;br /&gt;
1102 $ printf '%s\n' 'v' | busybox sed 's.\..X.'&lt;br /&gt;
1103 v&lt;br /&gt;
1104 the &quot;trick&quot; is not really a workaround to get the &quot;other …
1105 )&lt;br /&gt;
1106 &lt;br /&gt;
1107 &lt;br /&gt;
1108 &lt;br /&gt;
1109 &lt;br /&gt;
1110 3. Probably just a bug:&lt;br /&gt;
1111 &lt;br /&gt;
1112 Not really an issue with POSIX, but just as an example how confusing thi…
1113 &lt;br /&gt;
1114 &lt;br /&gt;
1115 (GNU sed:&lt;br /&gt;
1116 $ printf '%s\n' '9+' | sed 's+9\++X+'&lt;br /&gt;
1117 X&lt;br /&gt;
1118 $ printf '%s\n' '99+' | sed 's+9\++X+'&lt;br /&gt;
1119 9X&lt;br /&gt;
1120 $ printf '%s\n' '999+' | sed 's+9\++X+'&lt;br /&gt;
1121 99X&lt;br /&gt;
1122 )&lt;br /&gt;
1123 These results are IMO fine, regardless of my other questions above.&lt;b…
1124 &lt;br /&gt;
1125 In BREs, + alone is never special, and whether one parses all at once&lt…
1126 from left to right (as in (1b))... or first looks for unquoted delimiter…
1127 and splits the command there (as in (1a))...&lt;br /&gt;
1128 ... the RE should always be effectively the string 9+ ... which is (in&…
1129 BREs) the literal 9 followed by the literal + .&lt;br /&gt;
1130 &lt;br /&gt;
1131 &lt;br /&gt;
1132 However...&lt;br /&gt;
1133 &lt;br /&gt;
1134 &lt;br /&gt;
1135 (BusyBox sed:&lt;br /&gt;
1136 $ printf '%s\n' '9+' | busybox sed 's+9\++X+'&lt;br /&gt;
1137 X+&lt;br /&gt;
1138 $ printf '%s\n' '99+' | busybox sed 's+9\++X+'&lt;br /&gt;
1139 X+&lt;br /&gt;
1140 $ printf '%s\n' '999+' | busybox sed 's+9\++X+'&lt;br /&gt;
1141 X+&lt;br /&gt;
1142 )&lt;br /&gt;
1143 somehow does both:&lt;br /&gt;
1144 - make out of the \+ a non-delimiter&lt;br /&gt;
1145 - transforms the (wrt BRE) non-special character + into a special one.&l…
1146 &lt;br /&gt;
1147 Which I think is generally (regardless of the interpretation or any&lt;b…
1148 ambiguities in POSIX) a bug (I'll report it there).&lt;br /&gt;
1149 &lt;br /&gt;
1150 &lt;br /&gt;
1151 All the above should also at least partially apply to context addresses.…
1152 &lt;br /&gt;
1153 I'd guess nothing of it applies to the y-command, though,.. but I haven'…
1154 <guid>https://www.austingroupbugs.net/view.php?id=1551</guid>
1155 <author>calestyo &lt;[email protected]&gt;</author>
1156 <comments>https://www.austingroupbugs.net/view.php?id=1551#bugnotes</com…
1157 </item>
1158 <item>
1159 <title>0001560: clarify wording of command substitution</title>
1160 <link>https://www.austingroupbugs.net/view.php?id=1560</link>
1161 <description>In:&lt;br /&gt;
1162 &lt;a href=&quot;https://collaboration.opengroup.org/austin/plato/protec…
1163 &lt;br /&gt;
1164 I've had asked whether POSIX requires any conforming shell to consider a…
1165 &lt;br /&gt;
1166 The answer was, that a shell MUST in fact consider such lines.</descript…
1167 <guid>https://www.austingroupbugs.net/view.php?id=1560</guid>
1168 <author>calestyo &lt;[email protected]&gt;</author>
1169 <comments>https://www.austingroupbugs.net/view.php?id=1560#bugnotes</com…
1170 </item>
1171 </channel>
1172 </rss>
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.