# # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # # ERRATA.txt # # Errata/problems/notes about problems in the current sources # ######## Errata #001: ######## The usage of |posix_spawn()| has been manually disabled because there seems to be a race condition which cases sporadic failures like this: -- snip --. $ builtin | fgrep sum | fgrep sum /usr/ast/bin/sum /usr/bin/sum $ builtin | fgrep sum | fgrep sum fgrep: fgrep: cannot execute [Exec format error] -- snip --. The following files have been changed: -- snip -- Index: src/lib/libast/sparcv9/include/ast/ast_lib.h =================================================================== --- src/lib/libast/sparcv9/include/ast/ast_lib.h (revision 888) +++ src/lib/libast/sparcv9/include/ast/ast_lib.h (working copy) @@ -160,7 +160,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/sparcv9/src/lib/libast/ast_lib.h =================================================================== --- src/lib/libast/sparcv9/src/lib/libast/ast_lib.h (revision 888) +++ src/lib/libast/sparcv9/src/lib/libast/ast_lib.h (working copy) @@ -139,7 +139,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib =================================================================== --- src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib (revision 888) +++ src/lib/libast/sparcv9/src/lib/libast/FEATURE/lib (working copy) @@ -139,7 +139,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/sparc/include/ast/ast_lib.h =================================================================== --- src/lib/libast/sparc/include/ast/ast_lib.h (revision 888) +++ src/lib/libast/sparc/include/ast/ast_lib.h (working copy) @@ -171,7 +171,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/sparc/src/lib/libast/ast_lib.h =================================================================== --- src/lib/libast/sparc/src/lib/libast/ast_lib.h (revision 888) +++ src/lib/libast/sparc/src/lib/libast/ast_lib.h (working copy) @@ -150,7 +150,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/sparc/src/lib/libast/FEATURE/lib =================================================================== --- src/lib/libast/sparc/src/lib/libast/FEATURE/lib (revision 888) +++ src/lib/libast/sparc/src/lib/libast/FEATURE/lib (working copy) @@ -150,7 +150,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/i386/include/ast/ast_lib.h =================================================================== --- src/lib/libast/i386/include/ast/ast_lib.h (revision 888) +++ src/lib/libast/i386/include/ast/ast_lib.h (working copy) @@ -171,7 +171,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/i386/src/lib/libast/ast_lib.h =================================================================== --- src/lib/libast/i386/src/lib/libast/ast_lib.h (revision 888) +++ src/lib/libast/i386/src/lib/libast/ast_lib.h (working copy) @@ -150,7 +150,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/i386/src/lib/libast/FEATURE/lib =================================================================== --- src/lib/libast/i386/src/lib/libast/FEATURE/lib (revision 888) +++ src/lib/libast/i386/src/lib/libast/FEATURE/lib (working copy) @@ -150,7 +150,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/amd64/include/ast/ast_lib.h =================================================================== --- src/lib/libast/amd64/include/ast/ast_lib.h (revision 888) +++ src/lib/libast/amd64/include/ast/ast_lib.h (working copy) @@ -160,7 +160,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/amd64/src/lib/libast/ast_lib.h =================================================================== --- src/lib/libast/amd64/src/lib/libast/ast_lib.h (revision 888) +++ src/lib/libast/amd64/src/lib/libast/ast_lib.h (working copy) @@ -139,7 +139,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ Index: src/lib/libast/amd64/src/lib/libast/FEATURE/lib =================================================================== --- src/lib/libast/amd64/src/lib/libast/FEATURE/lib (revision 888) +++ src/lib/libast/amd64/src/lib/libast/FEATURE/lib (working copy) @@ -139,7 +139,7 @@ #define _hdr_unistd 1 /* #include ok */ #define _lib_vfork 1 /* vfork exists and it works */ #define _real_vfork 1 /* vfork child shares data with parent */ -#define _lib_posix_spawn 2 /* posix_spawn exists and it works and its worth using */ +#define _lib_posix_spawn 1 /* posix_spawn exists and it works and its worth using */ #define _stream_peek 1 /* ioctl(I_PEEK) works */ #define _socket_peek 1 /* recv(MSG_PEEK) works */ #define _hdr_string 1 /* #include ok */ -- snip -- ######## Errata #002: ######## A workaround was added for a problem with the "multiline" editor mode which occurs when the edit line becomes longer than the terminal's width and the terminal cursor is not at position 0 when PS1 is send to the terminal. For example: The user executes a $ printf "foo" # the prompt will start at position 3 instead of 0. If the user enters a command which is longer than the terminal width and then removes enougth characters that the edit line fits again into one line the "foo" at the beginning will be overwritten with the prompt. The workaround is to add $(printf "%*s\r%s" COLUMNS "") at the beginning of PS1 set by /etc/ksh.kshrc, this causes the shell to move to the beginning of the next line if the terminal cursor is not at position 0. ######## Errata #003: ######## A fix was backported to cure sporadic VSC test suite failures. The failures are generated when command substitutions+functions are executed in a nested manner - sometimes the return code is non-zero even if the called function explicitly contains a "return 0"-statement. The following files have been changed: -- snip -- Index: src/lib/libshell/common/sh/jobs.c =================================================================== --- src/lib/libshell/common/sh/jobs.c (revision 1284) +++ src/lib/libshell/common/sh/jobs.c (working copy) @@ -1224,6 +1224,8 @@ job_lock(); if(pid > 1) { + if(pid==sh.spid) + sh.spid = 0; if(!(pw=job_bypid(pid))) { /* check to see whether job status has been saved */ -- snip -- ######## Errata #004: ######## A fix was backported to cure a hang in a command substitution when the amount of data exceeds a certain amount of data (this was causing the hang in CR #6800929 ("snv_106 ksh93 update breaks Install(1M)")). The following files have been changed: -- snip -- Index: src/lib/libshell/common/include/defs.h =================================================================== --- src/lib/libshell/common/include/defs.h (revision 1391) +++ src/lib/libshell/common/include/defs.h (working copy) @@ -166,6 +166,7 @@ char winch; \ char indebug; /* set when in debug trap */ \ unsigned char lastsig; /* last signal received */ \ + char subshare; /* set when in ${..} comsub */ \ char *readscript; /* set before reading a script */ \ int *inpipe; /* input pipe pointer */ \ int *outpipe; /* output pipe pointer */ \ Index: src/lib/libshell/common/sh/subshell.c =================================================================== --- src/lib/libshell/common/sh/subshell.c (revision 1391) +++ src/lib/libshell/common/sh/subshell.c (working copy) @@ -89,6 +89,7 @@ int coutpipe; int cpipe; int nofork; + char subshare; } *subshell_data; static int subenv; @@ -477,7 +478,9 @@ sp->bckpid = shp->bckpid; if(comsub) sh_stats(STAT_COMSUB); - if(!comsub || (comsub==1 && !sh_isoption(SH_SUBSHARE))) + sp->subshare = shp->subshare; + shp->subshare = comsub==2 || (comsub==1 && sh_isoption(SH_SUBSHARE)); + if(!comsub || !shp->subshare) { sp->shpwd = shp->pwd; sp->pwd = (shp->pwd?strdup(shp->pwd):0); @@ -677,6 +680,7 @@ shp->cpipe[1] = sp->cpipe; shp->coutpipe = sp->coutpipe; } + shp->subshare = sp->subshare; if(shp->subshell) SH_SUBSHELLNOD->nvalue.s = --shp->subshell; if(sp->sig) Index: src/lib/libshell/common/sh/xec.c =================================================================== --- src/lib/libshell/common/sh/xec.c (revision 1391) +++ src/lib/libshell/common/sh/xec.c (working copy) @@ -1406,7 +1406,12 @@ pid_t savepgid = job.curpgid; job.curpgid = 0; if(shp->subshell) - sh_subtmpfile(1); + { + if(shp->subshare) + sh_subtmpfile(0); + else + sh_subfork(); + } shp->inpipe = pvo; shp->outpipe = pvn; pvo[1] = -1; -- snip -- ######## Errata #005: ######## A fix was backported for CR #6807179 to cure an unneccesary |libc::getpwnam()| lookup when the shell encountered a "~(modifer)pattern"-shell pattern (the leading '~' triggered a (unneccesary) tilde expansion). The following files have been changed: -- snip -- --- src/lib/libshell/common/sh/macro.c Wed Feb 18 11:53:56 2009 +0800 +++ src/lib/libshell/common/sh/macro.c Wed Feb 18 21:45:00 2009 +0100 @@ -439,7 +439,7 @@ mp->sp = NIL(Sfio_t*); mp->quote = newquote; first = cp = fcseek(0); - if(!mp->quote && *cp=='~') + if(!mp->quote && *cp=='~' && cp[1]!=LPAREN) tilde = stktell(stkp); /* handle // operator specially */ if(mp->pattern==2 && *cp=='/') -- snip -- #EOF.