diff options
author | Roger A. Faulkner <Roger.Faulkner@Oracle.COM> | 2010-04-03 09:48:44 -0700 |
---|---|---|
committer | Roger A. Faulkner <Roger.Faulkner@Oracle.COM> | 2010-04-03 09:48:44 -0700 |
commit | 3e14f97f673e8a630f076077de35afdd43dc1587 (patch) | |
tree | 9828b6b676f58d7b27dd28e00202d3f3461a5cd8 /usr/src/lib/libshell/common/sh/path.c | |
parent | 4f60987df4dcaa54a88b596f861fbf4f3382c65e (diff) | |
download | illumos-gate-3e14f97f673e8a630f076077de35afdd43dc1587.tar.gz |
6939349 RFE: Update ksh93 to ast-ksh.2010-03-09
6877392 ksh93 regresses 'uniq -c' performance
6887363 Korn shell 93 sometimes mishandles return value of its child process
6900314 (while true ; do true|true ; done) hang in ioctl() with SIGTTOU
6904557 wc no longer counts number of bytes correctly
6904575 cut -d with multibyte character no longer works
6904597 paste -d no longer works with multibyte characters
6904780 /usr/bin/cksum changed output in snv_128
6904870 uniq -s does not skip multibyte characters correctly
6904878 join -t no longer works with multibyte char separator
6907460 EXIT trap handlers are sometimes executed twice
6909579 libast getopt solaris compatibility broken
6920072 ksh93 tail -f, with unconditional .25s sleep and line parsing, about 37x slower than cat
6932124 mktemp in ksh93 is broken
Contributed by Olga Kryzhanovska <olga.kryzhanovska@gmail.com>
Diffstat (limited to 'usr/src/lib/libshell/common/sh/path.c')
-rw-r--r-- | usr/src/lib/libshell/common/sh/path.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/usr/src/lib/libshell/common/sh/path.c b/usr/src/lib/libshell/common/sh/path.c index 94af2fe682..c6f691aef4 100644 --- a/usr/src/lib/libshell/common/sh/path.c +++ b/usr/src/lib/libshell/common/sh/path.c @@ -1,7 +1,7 @@ /*********************************************************************** * * * This software is part of the ast package * -* Copyright (c) 1982-2009 AT&T Intellectual Property * +* Copyright (c) 1982-2010 AT&T Intellectual Property * * and is licensed under the * * Common Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -39,8 +39,6 @@ #if SHOPT_PFSH # ifdef _hdr_exec_attr # include <exec_attr.h> -# else -# undef SHOPT_PFSH # endif # if _lib_vfork # include <ast_vfork.h> @@ -139,7 +137,10 @@ static pid_t _spawnveg(const char *path, char* const argv[], char* const envp[], _sh_fork(pid, 0, (int*)0); } job.waitsafe = waitsafe; - job_unlock(); + if(pid>0) + job_fork(pid); + else + job_unlock(); return(pid); } /* @@ -1497,7 +1498,7 @@ static int path_chkpaths(Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int } *cp = 0; m = ep ? (ep-sp) : 0; - if(!m || m==6 && memcmp((void*)sp,(void*)"FPATH=",6)==0) + if(m==0 || m==6 && memcmp((void*)sp,(void*)"FPATH=",6)==0) { if(first) { @@ -1509,8 +1510,13 @@ static int path_chkpaths(Pathcomp_t *first, Pathcomp_t* old,Pathcomp_t *pp, int } else if(m==12 && memcmp((void*)sp,(void*)"BUILTIN_LIB=",12)==0) { - if(!(pp->flags & PATH_BUILTIN_LIB)) + if(!(pp->flags & PATH_BUILTIN_LIB) || strchr(ep,'-')) { + if ((pp->flags & (PATH_BUILTIN_LIB|PATH_STD_DIR)) == PATH_BUILTIN_LIB) + { + free(pp->blib); + pp->blib = 0; + } pp->flags |= PATH_BUILTIN_LIB; if (*ep == '.' && !*(ep + 1)) pp->flags |= PATH_STD_DIR; |