xref: /titanic_50/usr/src/lib/libshell/misc/ERRATA.txt (revision 9a6f360e750e0b14fc9b9bf8347e0ebad3959e3f)
1da2e3ebdSchin#
2da2e3ebdSchin# CDDL HEADER START
3da2e3ebdSchin#
4da2e3ebdSchin# The contents of this file are subject to the terms of the
5da2e3ebdSchin# Common Development and Distribution License (the "License").
6da2e3ebdSchin# You may not use this file except in compliance with the License.
7da2e3ebdSchin#
8da2e3ebdSchin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da2e3ebdSchin# or http://www.opensolaris.org/os/licensing.
10da2e3ebdSchin# See the License for the specific language governing permissions
11da2e3ebdSchin# and limitations under the License.
12da2e3ebdSchin#
13da2e3ebdSchin# When distributing Covered Code, include this CDDL HEADER in each
14da2e3ebdSchin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da2e3ebdSchin# If applicable, add the following below this CDDL HEADER, with the
16da2e3ebdSchin# fields enclosed by brackets "[]" replaced with your own identifying
17da2e3ebdSchin# information: Portions Copyright [yyyy] [name of copyright owner]
18da2e3ebdSchin#
19da2e3ebdSchin# CDDL HEADER END
20da2e3ebdSchin#
217c2fbfb3SApril Chin
22da2e3ebdSchin#
2381af778eSCasper H.S. Dik# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
247c2fbfb3SApril Chin# Use is subject to license terms.
25da2e3ebdSchin#
26da2e3ebdSchin
27da2e3ebdSchin#
28da2e3ebdSchin# ERRATA.txt
29da2e3ebdSchin#
30da2e3ebdSchin# Errata/problems/notes about problems in the current sources
31da2e3ebdSchin#
32da2e3ebdSchin
33da2e3ebdSchin######## Errata #001: ########
347c2fbfb3SApril ChinThe usage of |posix_spawn()| has been manually disabled because there seems to be a
357c2fbfb3SApril Chinrace condition which cases sporadic failures like this:
367c2fbfb3SApril Chin-- snip --.
377c2fbfb3SApril Chin$ builtin | fgrep sum | fgrep sum
387c2fbfb3SApril Chin/usr/ast/bin/sum
397c2fbfb3SApril Chin/usr/bin/sum
407c2fbfb3SApril Chin$ builtin | fgrep sum | fgrep sum
417c2fbfb3SApril Chinfgrep: fgrep: cannot execute [Exec format error]
427c2fbfb3SApril Chin-- snip --.
437c2fbfb3SApril ChinThe following files have been changed:
44da2e3ebdSchin-- snip --
457c2fbfb3SApril ChinIndex: src/lib/libast/sparcv9/include/ast/ast_lib.h
467c2fbfb3SApril Chin===================================================================
477c2fbfb3SApril Chin--- src/lib/libast/sparcv9/include/ast/ast_lib.h	(revision 888)
487c2fbfb3SApril Chin+++ src/lib/libast/sparcv9/include/ast/ast_lib.h	(working copy)
497c2fbfb3SApril Chin@@ -160,7 +160,7 @@
507c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
517c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
527c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
537c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
547c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
557c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
567c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
577c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
587c2fbfb3SApril ChinIndex: src/lib/libast/sparcv9/src/lib/libast/ast_lib.h
597c2fbfb3SApril Chin===================================================================
607c2fbfb3SApril Chin--- src/lib/libast/sparcv9/src/lib/libast/ast_lib.h	(revision 888)
617c2fbfb3SApril Chin+++ src/lib/libast/sparcv9/src/lib/libast/ast_lib.h	(working copy)
627c2fbfb3SApril Chin@@ -139,7 +139,7 @@
637c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
647c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
657c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
667c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
677c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
687c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
697c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
707c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
717c2fbfb3SApril ChinIndex: src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib
727c2fbfb3SApril Chin===================================================================
737c2fbfb3SApril Chin--- src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib	(revision 888)
747c2fbfb3SApril Chin+++ src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib	(working copy)
757c2fbfb3SApril Chin@@ -139,7 +139,7 @@
767c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
777c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
787c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
797c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
807c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
817c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
827c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
837c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
847c2fbfb3SApril ChinIndex: src/lib/libast/sparc/include/ast/ast_lib.h
857c2fbfb3SApril Chin===================================================================
867c2fbfb3SApril Chin--- src/lib/libast/sparc/include/ast/ast_lib.h	(revision 888)
877c2fbfb3SApril Chin+++ src/lib/libast/sparc/include/ast/ast_lib.h	(working copy)
887c2fbfb3SApril Chin@@ -171,7 +171,7 @@
897c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
907c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
917c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
927c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
937c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
947c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
957c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
967c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
977c2fbfb3SApril ChinIndex: src/lib/libast/sparc/src/lib/libast/ast_lib.h
987c2fbfb3SApril Chin===================================================================
997c2fbfb3SApril Chin--- src/lib/libast/sparc/src/lib/libast/ast_lib.h	(revision 888)
1007c2fbfb3SApril Chin+++ src/lib/libast/sparc/src/lib/libast/ast_lib.h	(working copy)
1017c2fbfb3SApril Chin@@ -150,7 +150,7 @@
1027c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
1037c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
1047c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
1057c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
1067c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
1077c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
1087c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
1097c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
1107c2fbfb3SApril ChinIndex: src/lib/libast/sparc/src/lib/libast/FEATURE/lib
1117c2fbfb3SApril Chin===================================================================
1127c2fbfb3SApril Chin--- src/lib/libast/sparc/src/lib/libast/FEATURE/lib	(revision 888)
1137c2fbfb3SApril Chin+++ src/lib/libast/sparc/src/lib/libast/FEATURE/lib	(working copy)
1147c2fbfb3SApril Chin@@ -150,7 +150,7 @@
1157c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
1167c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
1177c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
1187c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
1197c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
1207c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
1217c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
1227c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
1237c2fbfb3SApril ChinIndex: src/lib/libast/i386/include/ast/ast_lib.h
1247c2fbfb3SApril Chin===================================================================
1257c2fbfb3SApril Chin--- src/lib/libast/i386/include/ast/ast_lib.h	(revision 888)
1267c2fbfb3SApril Chin+++ src/lib/libast/i386/include/ast/ast_lib.h	(working copy)
1277c2fbfb3SApril Chin@@ -171,7 +171,7 @@
1287c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
1297c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
1307c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
1317c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
1327c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
1337c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
1347c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
1357c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
1367c2fbfb3SApril ChinIndex: src/lib/libast/i386/src/lib/libast/ast_lib.h
1377c2fbfb3SApril Chin===================================================================
1387c2fbfb3SApril Chin--- src/lib/libast/i386/src/lib/libast/ast_lib.h	(revision 888)
1397c2fbfb3SApril Chin+++ src/lib/libast/i386/src/lib/libast/ast_lib.h	(working copy)
1407c2fbfb3SApril Chin@@ -150,7 +150,7 @@
1417c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
1427c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
1437c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
1447c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
1457c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
1467c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
1477c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
1487c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
1497c2fbfb3SApril ChinIndex: src/lib/libast/i386/src/lib/libast/FEATURE/lib
1507c2fbfb3SApril Chin===================================================================
1517c2fbfb3SApril Chin--- src/lib/libast/i386/src/lib/libast/FEATURE/lib	(revision 888)
1527c2fbfb3SApril Chin+++ src/lib/libast/i386/src/lib/libast/FEATURE/lib	(working copy)
1537c2fbfb3SApril Chin@@ -150,7 +150,7 @@
1547c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
1557c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
1567c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
1577c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
1587c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
1597c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
1607c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
1617c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
1627c2fbfb3SApril ChinIndex: src/lib/libast/amd64/include/ast/ast_lib.h
1637c2fbfb3SApril Chin===================================================================
1647c2fbfb3SApril Chin--- src/lib/libast/amd64/include/ast/ast_lib.h	(revision 888)
1657c2fbfb3SApril Chin+++ src/lib/libast/amd64/include/ast/ast_lib.h	(working copy)
1667c2fbfb3SApril Chin@@ -160,7 +160,7 @@
1677c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
1687c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
1697c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
1707c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
1717c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
1727c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
1737c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
1747c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
1757c2fbfb3SApril ChinIndex: src/lib/libast/amd64/src/lib/libast/ast_lib.h
1767c2fbfb3SApril Chin===================================================================
1777c2fbfb3SApril Chin--- src/lib/libast/amd64/src/lib/libast/ast_lib.h	(revision 888)
1787c2fbfb3SApril Chin+++ src/lib/libast/amd64/src/lib/libast/ast_lib.h	(working copy)
1797c2fbfb3SApril Chin@@ -139,7 +139,7 @@
1807c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
1817c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
1827c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
1837c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
1847c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
1857c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
1867c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
1877c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
1887c2fbfb3SApril ChinIndex: src/lib/libast/amd64/src/lib/libast/FEATURE/lib
1897c2fbfb3SApril Chin===================================================================
1907c2fbfb3SApril Chin--- src/lib/libast/amd64/src/lib/libast/FEATURE/lib	(revision 888)
1917c2fbfb3SApril Chin+++ src/lib/libast/amd64/src/lib/libast/FEATURE/lib	(working copy)
1927c2fbfb3SApril Chin@@ -139,7 +139,7 @@
1937c2fbfb3SApril Chin #define _hdr_unistd	1	/* #include <unistd.h> ok */
1947c2fbfb3SApril Chin #define _lib_vfork	1	/* vfork exists and it works */
1957c2fbfb3SApril Chin #define _real_vfork	1	/* vfork child shares data with parent */
1967c2fbfb3SApril Chin-#define _lib_posix_spawn	2	/* posix_spawn exists and it works and its worth using */
1977c2fbfb3SApril Chin+#define _lib_posix_spawn	1	/* posix_spawn exists and it works and its worth using */
1987c2fbfb3SApril Chin #define _stream_peek	1	/* ioctl(I_PEEK) works */
1997c2fbfb3SApril Chin #define _socket_peek	1	/* recv(MSG_PEEK) works */
2007c2fbfb3SApril Chin #define _hdr_string	1	/* #include <string.h> ok */
201da2e3ebdSchin-- snip --
202da2e3ebdSchin
203da2e3ebdSchin
204da2e3ebdSchin######## Errata #002: ########
2057c2fbfb3SApril ChinA workaround was added for a problem with the "multiline" editor mode which
2067c2fbfb3SApril Chinoccurs when the edit line becomes longer than the terminal's width and the
2077c2fbfb3SApril Chinterminal cursor is not at position 0 when PS1 is send to the terminal.
208da2e3ebdSchin
2097c2fbfb3SApril ChinFor example: The user executes a $ printf "foo"<enter> # the prompt will start
2107c2fbfb3SApril Chinat position 3 instead of 0. If the user enters a command which is longer than
2117c2fbfb3SApril Chinthe terminal width and then removes enougth characters that the edit line fits
2127c2fbfb3SApril Chinagain into one line the "foo" at the beginning will be overwritten with the
2137c2fbfb3SApril Chinprompt.
2147c2fbfb3SApril Chin
2157c2fbfb3SApril ChinThe workaround is to add $(printf "%*s\r%s" COLUMNS "") at the beginning of
2167c2fbfb3SApril ChinPS1 set by /etc/ksh.kshrc, this causes the shell to move to the beginning
2177c2fbfb3SApril Chinof the next line if the terminal cursor is not at position 0.
218da2e3ebdSchin
219da2e3ebdSchin
220da2e3ebdSchin######## Errata #003: ########
2217c2fbfb3SApril ChinA fix was backported to cure sporadic VSC test suite failures. The failures are
2227c2fbfb3SApril Chingenerated when command substitutions+functions are executed in a nested manner
2237c2fbfb3SApril Chin- sometimes the return code is non-zero even if the called function explicitly
2247c2fbfb3SApril Chincontains a "return 0"-statement.
2257c2fbfb3SApril ChinThe following files have been changed:
226da2e3ebdSchin-- snip --
227da2e3ebdSchinIndex: src/lib/libshell/common/sh/jobs.c
228da2e3ebdSchin===================================================================
2297c2fbfb3SApril Chin--- src/lib/libshell/common/sh/jobs.c	(revision 1284)
230da2e3ebdSchin+++ src/lib/libshell/common/sh/jobs.c	(working copy)
2317c2fbfb3SApril Chin@@ -1224,6 +1224,8 @@
232da2e3ebdSchin 	job_lock();
2337c2fbfb3SApril Chin 	if(pid > 1)
2347c2fbfb3SApril Chin 	{
2357c2fbfb3SApril Chin+		if(pid==sh.spid)
2367c2fbfb3SApril Chin+			sh.spid = 0;
2377c2fbfb3SApril Chin 		if(!(pw=job_bypid(pid)))
2387c2fbfb3SApril Chin 		{
2397c2fbfb3SApril Chin 			/* check to see whether job status has been saved */
240da2e3ebdSchin-- snip --
2417c2fbfb3SApril Chin
24281af778eSCasper H.S. Dik
24381af778eSCasper H.S. Dik######## Errata #004: ########
24481af778eSCasper H.S. DikA fix was backported to cure a hang in a command substitution when the
24581af778eSCasper H.S. Dikamount of data exceeds a certain amount of data (this was causing
24681af778eSCasper H.S. Dikthe hang in CR #6800929 ("snv_106 ksh93 update breaks Install(1M)")).
24781af778eSCasper H.S. DikThe following files have been changed:
24881af778eSCasper H.S. Dik-- snip --
24981af778eSCasper H.S. DikIndex: src/lib/libshell/common/include/defs.h
25081af778eSCasper H.S. Dik===================================================================
25181af778eSCasper H.S. Dik--- src/lib/libshell/common/include/defs.h	(revision 1391)
25281af778eSCasper H.S. Dik+++ src/lib/libshell/common/include/defs.h	(working copy)
25381af778eSCasper H.S. Dik@@ -166,6 +166,7 @@
25481af778eSCasper H.S. Dik 	char		winch; \
25581af778eSCasper H.S. Dik 	char		indebug; 	/* set when in debug trap */ \
25681af778eSCasper H.S. Dik 	unsigned char	lastsig;	/* last signal received */ \
25781af778eSCasper H.S. Dik+	char		subshare;	/* set when in ${..} comsub */ \
25881af778eSCasper H.S. Dik 	char		*readscript;	/* set before reading a script */ \
25981af778eSCasper H.S. Dik 	int		*inpipe;	/* input pipe pointer */ \
26081af778eSCasper H.S. Dik 	int		*outpipe;	/* output pipe pointer */ \
26181af778eSCasper H.S. DikIndex: src/lib/libshell/common/sh/subshell.c
26281af778eSCasper H.S. Dik===================================================================
26381af778eSCasper H.S. Dik--- src/lib/libshell/common/sh/subshell.c	(revision 1391)
26481af778eSCasper H.S. Dik+++ src/lib/libshell/common/sh/subshell.c	(working copy)
26581af778eSCasper H.S. Dik@@ -89,6 +89,7 @@
26681af778eSCasper H.S. Dik 	int		coutpipe;
26781af778eSCasper H.S. Dik 	int		cpipe;
26881af778eSCasper H.S. Dik 	int		nofork;
26981af778eSCasper H.S. Dik+	char		subshare;
27081af778eSCasper H.S. Dik } *subshell_data;
27181af778eSCasper H.S. Dik
27281af778eSCasper H.S. Dik static int subenv;
27381af778eSCasper H.S. Dik@@ -477,7 +478,9 @@
27481af778eSCasper H.S. Dik 	sp->bckpid = shp->bckpid;
27581af778eSCasper H.S. Dik 	if(comsub)
27681af778eSCasper H.S. Dik 		sh_stats(STAT_COMSUB);
27781af778eSCasper H.S. Dik-	if(!comsub || (comsub==1 && !sh_isoption(SH_SUBSHARE)))
27881af778eSCasper H.S. Dik+	sp->subshare = shp->subshare;
27981af778eSCasper H.S. Dik+	shp->subshare = comsub==2 ||  (comsub==1 && sh_isoption(SH_SUBSHARE));
28081af778eSCasper H.S. Dik+	if(!comsub || !shp->subshare)
28181af778eSCasper H.S. Dik 	{
28281af778eSCasper H.S. Dik 		sp->shpwd = shp->pwd;
28381af778eSCasper H.S. Dik 		sp->pwd = (shp->pwd?strdup(shp->pwd):0);
28481af778eSCasper H.S. Dik@@ -677,6 +680,7 @@
28581af778eSCasper H.S. Dik 		shp->cpipe[1] = sp->cpipe;
28681af778eSCasper H.S. Dik 		shp->coutpipe = sp->coutpipe;
28781af778eSCasper H.S. Dik 	}
28881af778eSCasper H.S. Dik+	shp->subshare = sp->subshare;
28981af778eSCasper H.S. Dik 	if(shp->subshell)
29081af778eSCasper H.S. Dik 		SH_SUBSHELLNOD->nvalue.s = --shp->subshell;
29181af778eSCasper H.S. Dik 	if(sp->sig)
29281af778eSCasper H.S. DikIndex: src/lib/libshell/common/sh/xec.c
29381af778eSCasper H.S. Dik===================================================================
29481af778eSCasper H.S. Dik--- src/lib/libshell/common/sh/xec.c	(revision 1391)
29581af778eSCasper H.S. Dik+++ src/lib/libshell/common/sh/xec.c	(working copy)
29681af778eSCasper H.S. Dik@@ -1406,7 +1406,12 @@
29781af778eSCasper H.S. Dik 			pid_t	savepgid = job.curpgid;
29881af778eSCasper H.S. Dik 			job.curpgid = 0;
29981af778eSCasper H.S. Dik 			if(shp->subshell)
30081af778eSCasper H.S. Dik-				sh_subtmpfile(1);
30181af778eSCasper H.S. Dik+			{
30281af778eSCasper H.S. Dik+				if(shp->subshare)
30381af778eSCasper H.S. Dik+					sh_subtmpfile(0);
30481af778eSCasper H.S. Dik+				else
30581af778eSCasper H.S. Dik+					sh_subfork();
30681af778eSCasper H.S. Dik+			}
30781af778eSCasper H.S. Dik 			shp->inpipe = pvo;
30881af778eSCasper H.S. Dik 			shp->outpipe = pvn;
30981af778eSCasper H.S. Dik 			pvo[1] = -1;
31081af778eSCasper H.S. Dik-- snip --
311*9a6f360eSCasper H.S. Dik
312*9a6f360eSCasper H.S. Dik
313*9a6f360eSCasper H.S. Dik######## Errata #005: ########
314*9a6f360eSCasper H.S. DikA fix was backported for CR #6807179 to cure an unneccesary
315*9a6f360eSCasper H.S. Dik|libc::getpwnam()| lookup when the shell encountered a
316*9a6f360eSCasper H.S. Dik"~(modifer)pattern"-shell pattern (the leading '~' triggered a
317*9a6f360eSCasper H.S. Dik(unneccesary) tilde expansion).
318*9a6f360eSCasper H.S. DikThe following files have been changed:
319*9a6f360eSCasper H.S. Dik-- snip --
320*9a6f360eSCasper H.S. Dik--- src/lib/libshell/common/sh/macro.c    Wed Feb 18 11:53:56 2009 +0800
321*9a6f360eSCasper H.S. Dik+++ src/lib/libshell/common/sh/macro.c    Wed Feb 18 21:45:00 2009 +0100
322*9a6f360eSCasper H.S. Dik@@ -439,7 +439,7 @@
323*9a6f360eSCasper H.S. Dik 	mp->sp = NIL(Sfio_t*);
324*9a6f360eSCasper H.S. Dik 	mp->quote = newquote;
325*9a6f360eSCasper H.S. Dik 	first = cp = fcseek(0);
326*9a6f360eSCasper H.S. Dik-	if(!mp->quote && *cp=='~')
327*9a6f360eSCasper H.S. Dik+	if(!mp->quote && *cp=='~' && cp[1]!=LPAREN)
328*9a6f360eSCasper H.S. Dik 		tilde = stktell(stkp);
329*9a6f360eSCasper H.S. Dik 	/* handle // operator specially */
330*9a6f360eSCasper H.S. Dik 	if(mp->pattern==2 && *cp=='/')
331*9a6f360eSCasper H.S. Dik
332*9a6f360eSCasper H.S. Dik-- snip --
333*9a6f360eSCasper H.S. Dik
334da2e3ebdSchin#EOF.
335