Anonymous | Login | 2024-05-04 06:43 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000205 | [1003.1(2008)/Issue 7] Shell and Utilities | Objection | Omission | 2010-01-06 11:31 | 2013-04-16 13:06 | ||
Reporter | geoffclare | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Geoff Clare | ||||||
Organization | The Open Group | ||||||
User Reference | |||||||
Section | 2.9.2 | ||||||
Page Number | 2318 | ||||||
Line Number | 73175 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | See Note: 0000385 | ||||||
Summary | 0000205: Shell pipeline connection requirement too vague | ||||||
Description |
The requirement for the way commands in a pipeline are connected is stated as: "The standard output of all but the last command shall be connected to the standard input of the next command." This is too vague; it needs to say precisely how they are connected. Otherwise implementations could, for example, connect the commands using a pseudo-terminal which would cause some commands to behave differently (such as ls writing multi-column output). |
||||||
Desired Action |
Change "The standard output of all but the last command shall be connected to the standard input of the next command." to "For each command but the last, the shell shall connect the standard output of the command to the standard input of the next command by creating a pipe and passing the write end of the pipe as the standard output of the command and the read end of the pipe as the standard input of the next command." |
||||||
Tags | tc1-2008 | ||||||
Attached Files | |||||||
|
Notes | |
(0000367) eblake (manager) 2010-01-06 13:36 |
According to http://lists.gnu.org/archive/html/bug-coreutils/2009-09/msg00265.html, [^] most shells use pipe(), but ksh uses a socket. The proposed wording needs to account for the ksh implementation. |
(0000368) geoffclare (manager) 2010-01-06 15:04 |
I tried the latest ksh93 binary (93t+) and found that it uses a socket pair on Linux, but a pipe on OpenSolaris. (I originally tried 93s+ on Linux, then downloaded the latest to make sure it wasn't a difference between 93s+ and 93t+.) I assume there must be a good reason for it choosing to use a socket pair on some systems instead of a pipe, so I agree the wording should allow this behaviour. I suggest: "For each command but the last, the shell shall connect the standard output of the command to the standard input of the next command by creating either a pipe or a unidirectional socket pair (an unbound pair of connected sockets of type SOCK_STREAM with one of the pair shut down for sending and the other shut down for receiving - see [xref to socketpair()] and [xref to shutdown()]) and passing the writable end of the pipe or socket pair as the standard output of the command and the readable end of the pipe or socket pair as the standard input of the next command." |
(0000385) Don Cragun (manager) 2010-02-11 16:30 |
Change "The standard output of all but the last command shall be connected to the standard input of the next command." to "For each command but the last, the shell shall connect the standard output of the command to the standard input of the next command as if by creating a pipe and passing the write end of the pipe as the standard output of the command and the read end of the pipe as the standard input of the next command." |
Issue History | |||
Date Modified | Username | Field | Change |
2010-01-06 11:31 | geoffclare | New Issue | |
2010-01-06 11:31 | geoffclare | Status | New => Under Review |
2010-01-06 11:31 | geoffclare | Assigned To | => ajosey |
2010-01-06 11:31 | geoffclare | Name | => Geoff Clare |
2010-01-06 11:31 | geoffclare | Organization | => The Open Group |
2010-01-06 11:31 | geoffclare | Section | => 2.9.2 |
2010-01-06 11:31 | geoffclare | Page Number | => 2318 |
2010-01-06 11:31 | geoffclare | Line Number | => 73175 |
2010-01-06 11:31 | geoffclare | Interp Status | => --- |
2010-01-06 13:36 | eblake | Note Added: 0000367 | |
2010-01-06 15:04 | geoffclare | Note Added: 0000368 | |
2010-02-11 16:30 | Don Cragun | Note Added: 0000385 | |
2010-02-11 16:30 | Don Cragun | Status | Under Review => Resolved |
2010-02-11 16:30 | Don Cragun | Resolution | Open => Accepted As Marked |
2010-02-11 16:31 | Don Cragun | Final Accepted Text | => See Note: 0000385 |
2010-08-27 13:00 | ajosey | Tag Attached: tc1-2008 | |
2013-04-16 13:06 | ajosey | Status | Resolved => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |