xref: /titanic_44/usr/src/lib/libshell/misc/ERRATA.txt (revision a6a911618075176ed839dbe7f7c90604d0954b46)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21
22#
23# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26
27#
28# ERRATA.txt
29#
30# Errata/problems/notes about problems in the current sources
31#
32
33######## Errata #001: ########
34The usage of |posix_spawn()| has been manually disabled because there seems to be a
35race condition which cases sporadic failures like this:
36-- snip --.
37$ builtin | fgrep sum | fgrep sum
38/usr/ast/bin/sum
39/usr/bin/sum
40$ builtin | fgrep sum | fgrep sum
41fgrep: fgrep: cannot execute [Exec format error]
42-- snip --.
43The following files have been changed:
44-- snip --
45Index: src/lib/libast/sparcv9/include/ast/ast_lib.h
46===================================================================
47--- src/lib/libast/sparcv9/include/ast/ast_lib.h	(revision 888)
48+++ src/lib/libast/sparcv9/include/ast/ast_lib.h	(working copy)
49@@ -160,7 +160,7 @@
50 #define _hdr_unistd	1	/* #include <unistd.h> ok */
51 #define _lib_vfork	1	/* vfork exists and it works */
52 #define _real_vfork	1	/* vfork child shares data with parent */
53-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
54+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
55 #define _stream_peek	1	/* ioctl(I_PEEK) works */
56 #define _socket_peek	1	/* recv(MSG_PEEK) works */
57 #define _hdr_string	1	/* #include <string.h> ok */
58Index: src/lib/libast/sparcv9/src/lib/libast/ast_lib.h
59===================================================================
60--- src/lib/libast/sparcv9/src/lib/libast/ast_lib.h	(revision 888)
61+++ src/lib/libast/sparcv9/src/lib/libast/ast_lib.h	(working copy)
62@@ -139,7 +139,7 @@
63 #define _hdr_unistd	1	/* #include <unistd.h> ok */
64 #define _lib_vfork	1	/* vfork exists and it works */
65 #define _real_vfork	1	/* vfork child shares data with parent */
66-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
67+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
68 #define _stream_peek	1	/* ioctl(I_PEEK) works */
69 #define _socket_peek	1	/* recv(MSG_PEEK) works */
70 #define _hdr_string	1	/* #include <string.h> ok */
71Index: src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib
72===================================================================
73--- src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib	(revision 888)
74+++ src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib	(working copy)
75@@ -139,7 +139,7 @@
76 #define _hdr_unistd	1	/* #include <unistd.h> ok */
77 #define _lib_vfork	1	/* vfork exists and it works */
78 #define _real_vfork	1	/* vfork child shares data with parent */
79-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
80+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
81 #define _stream_peek	1	/* ioctl(I_PEEK) works */
82 #define _socket_peek	1	/* recv(MSG_PEEK) works */
83 #define _hdr_string	1	/* #include <string.h> ok */
84Index: src/lib/libast/sparc/include/ast/ast_lib.h
85===================================================================
86--- src/lib/libast/sparc/include/ast/ast_lib.h	(revision 888)
87+++ src/lib/libast/sparc/include/ast/ast_lib.h	(working copy)
88@@ -171,7 +171,7 @@
89 #define _hdr_unistd	1	/* #include <unistd.h> ok */
90 #define _lib_vfork	1	/* vfork exists and it works */
91 #define _real_vfork	1	/* vfork child shares data with parent */
92-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
93+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
94 #define _stream_peek	1	/* ioctl(I_PEEK) works */
95 #define _socket_peek	1	/* recv(MSG_PEEK) works */
96 #define _hdr_string	1	/* #include <string.h> ok */
97Index: src/lib/libast/sparc/src/lib/libast/ast_lib.h
98===================================================================
99--- src/lib/libast/sparc/src/lib/libast/ast_lib.h	(revision 888)
100+++ src/lib/libast/sparc/src/lib/libast/ast_lib.h	(working copy)
101@@ -150,7 +150,7 @@
102 #define _hdr_unistd	1	/* #include <unistd.h> ok */
103 #define _lib_vfork	1	/* vfork exists and it works */
104 #define _real_vfork	1	/* vfork child shares data with parent */
105-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
106+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
107 #define _stream_peek	1	/* ioctl(I_PEEK) works */
108 #define _socket_peek	1	/* recv(MSG_PEEK) works */
109 #define _hdr_string	1	/* #include <string.h> ok */
110Index: src/lib/libast/sparc/src/lib/libast/FEATURE/lib
111===================================================================
112--- src/lib/libast/sparc/src/lib/libast/FEATURE/lib	(revision 888)
113+++ src/lib/libast/sparc/src/lib/libast/FEATURE/lib	(working copy)
114@@ -150,7 +150,7 @@
115 #define _hdr_unistd	1	/* #include <unistd.h> ok */
116 #define _lib_vfork	1	/* vfork exists and it works */
117 #define _real_vfork	1	/* vfork child shares data with parent */
118-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
119+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
120 #define _stream_peek	1	/* ioctl(I_PEEK) works */
121 #define _socket_peek	1	/* recv(MSG_PEEK) works */
122 #define _hdr_string	1	/* #include <string.h> ok */
123Index: src/lib/libast/i386/include/ast/ast_lib.h
124===================================================================
125--- src/lib/libast/i386/include/ast/ast_lib.h	(revision 888)
126+++ src/lib/libast/i386/include/ast/ast_lib.h	(working copy)
127@@ -171,7 +171,7 @@
128 #define _hdr_unistd	1	/* #include <unistd.h> ok */
129 #define _lib_vfork	1	/* vfork exists and it works */
130 #define _real_vfork	1	/* vfork child shares data with parent */
131-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
132+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
133 #define _stream_peek	1	/* ioctl(I_PEEK) works */
134 #define _socket_peek	1	/* recv(MSG_PEEK) works */
135 #define _hdr_string	1	/* #include <string.h> ok */
136Index: src/lib/libast/i386/src/lib/libast/ast_lib.h
137===================================================================
138--- src/lib/libast/i386/src/lib/libast/ast_lib.h	(revision 888)
139+++ src/lib/libast/i386/src/lib/libast/ast_lib.h	(working copy)
140@@ -150,7 +150,7 @@
141 #define _hdr_unistd	1	/* #include <unistd.h> ok */
142 #define _lib_vfork	1	/* vfork exists and it works */
143 #define _real_vfork	1	/* vfork child shares data with parent */
144-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
145+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
146 #define _stream_peek	1	/* ioctl(I_PEEK) works */
147 #define _socket_peek	1	/* recv(MSG_PEEK) works */
148 #define _hdr_string	1	/* #include <string.h> ok */
149Index: src/lib/libast/i386/src/lib/libast/FEATURE/lib
150===================================================================
151--- src/lib/libast/i386/src/lib/libast/FEATURE/lib	(revision 888)
152+++ src/lib/libast/i386/src/lib/libast/FEATURE/lib	(working copy)
153@@ -150,7 +150,7 @@
154 #define _hdr_unistd	1	/* #include <unistd.h> ok */
155 #define _lib_vfork	1	/* vfork exists and it works */
156 #define _real_vfork	1	/* vfork child shares data with parent */
157-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
158+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
159 #define _stream_peek	1	/* ioctl(I_PEEK) works */
160 #define _socket_peek	1	/* recv(MSG_PEEK) works */
161 #define _hdr_string	1	/* #include <string.h> ok */
162Index: src/lib/libast/amd64/include/ast/ast_lib.h
163===================================================================
164--- src/lib/libast/amd64/include/ast/ast_lib.h	(revision 888)
165+++ src/lib/libast/amd64/include/ast/ast_lib.h	(working copy)
166@@ -160,7 +160,7 @@
167 #define _hdr_unistd	1	/* #include <unistd.h> ok */
168 #define _lib_vfork	1	/* vfork exists and it works */
169 #define _real_vfork	1	/* vfork child shares data with parent */
170-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
171+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
172 #define _stream_peek	1	/* ioctl(I_PEEK) works */
173 #define _socket_peek	1	/* recv(MSG_PEEK) works */
174 #define _hdr_string	1	/* #include <string.h> ok */
175Index: src/lib/libast/amd64/src/lib/libast/ast_lib.h
176===================================================================
177--- src/lib/libast/amd64/src/lib/libast/ast_lib.h	(revision 888)
178+++ src/lib/libast/amd64/src/lib/libast/ast_lib.h	(working copy)
179@@ -139,7 +139,7 @@
180 #define _hdr_unistd	1	/* #include <unistd.h> ok */
181 #define _lib_vfork	1	/* vfork exists and it works */
182 #define _real_vfork	1	/* vfork child shares data with parent */
183-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
184+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
185 #define _stream_peek	1	/* ioctl(I_PEEK) works */
186 #define _socket_peek	1	/* recv(MSG_PEEK) works */
187 #define _hdr_string	1	/* #include <string.h> ok */
188Index: src/lib/libast/amd64/src/lib/libast/FEATURE/lib
189===================================================================
190--- src/lib/libast/amd64/src/lib/libast/FEATURE/lib	(revision 888)
191+++ src/lib/libast/amd64/src/lib/libast/FEATURE/lib	(working copy)
192@@ -139,7 +139,7 @@
193 #define _hdr_unistd	1	/* #include <unistd.h> ok */
194 #define _lib_vfork	1	/* vfork exists and it works */
195 #define _real_vfork	1	/* vfork child shares data with parent */
196-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
197+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
198 #define _stream_peek	1	/* ioctl(I_PEEK) works */
199 #define _socket_peek	1	/* recv(MSG_PEEK) works */
200 #define _hdr_string	1	/* #include <string.h> ok */
201-- snip --
202
203
204######## Errata #002: ########
205A workaround was added for a problem with the "multiline" editor mode which
206occurs when the edit line becomes longer than the terminal's width and the
207terminal cursor is not at position 0 when PS1 is send to the terminal.
208
209For example: The user executes a $ printf "foo"<enter> # the prompt will start
210at position 3 instead of 0. If the user enters a command which is longer than
211the terminal width and then removes enougth characters that the edit line fits
212again into one line the "foo" at the beginning will be overwritten with the
213prompt.
214
215The workaround is to add $(printf "%*s\r%s" COLUMNS "") at the beginning of
216PS1 set by /etc/ksh.kshrc, this causes the shell to move to the beginning
217of the next line if the terminal cursor is not at position 0.
218
219
220######## Errata #003: ########
221A fix was backported to cure sporadic VSC test suite failures. The failures are
222generated when command substitutions+functions are executed in a nested manner
223- sometimes the return code is non-zero even if the called function explicitly
224contains a "return 0"-statement.
225The following files have been changed:
226-- snip --
227Index: src/lib/libshell/common/sh/jobs.c
228===================================================================
229--- src/lib/libshell/common/sh/jobs.c	(revision 1284)
230+++ src/lib/libshell/common/sh/jobs.c	(working copy)
231@@ -1224,6 +1224,8 @@
232 	job_lock();
233 	if(pid > 1)
234 	{
235+		if(pid==sh.spid)
236+			sh.spid = 0;
237 		if(!(pw=job_bypid(pid)))
238 		{
239 			/* check to see whether job status has been saved */
240-- snip --
241
242#EOF.
243