xref: /titanic_41/usr/src/lib/libshell/common/RELEASE93 (revision 15d9d0b528387242011cdcc6190c9e598cfe3a07)
1This is a list of changes that have been made since the 12/28/93 version
2of ksh.
3
41.	New features in 12/28/93b
5	a.  If IFS contains two consecutive identical characters belonging
6	    to the [:space:] class, then this character is treated as
7	    a non-space delimiter so that each instance will delimit
8	    a field.  For example, IFS=$'\t\t' will cause two consecutive
9	    tabs to delimit a null field.
10	b.  The getopts command has a -a name option that specifies a
11	    name that will be used for usage messages.
12
132.	New features in 12/28/93e
14	a.  The math functions, atan2, hypot, fmod, and pow were added.
15	b.  When a shared library is loaded, if the function lib_init()
16	    is defined in the library, it is invoked the first time that
17	    the library is loaded with builtin -f library.
18
193.	New features in 12/28/93f
20	a.  Hostnames in addition to host addresses can be given in
21	    /dev/tcp/host/port virtual file names.
22	b.  File name completion and expansion now quotes special
23	    characters in file names from both emacs and vi edit modes.
24
254.	New features in 12/28/93g
26	a.  The pipefail option has been added.  With pipefail
27	    enabled, a pipeline will not complete until all
28	    commands are complete, and the return value will
29	    be that of the last command to fail, or zero if
30	    all complete successfully.
31	b.  When an executable is found on a given path,
32	    the appropriate library path variable is prepended
33	    with a corresponding library directory.
345.	New features in 12/28/93h
35	a.  The PATH search algorithm has been modified to look
36	    for a file named .fpath in each bin directory and if
37	    found, to search for functions in this directory if
38	    it cannot find the command in that directory.
39	b.  When performing pathname expansion, the shell checks
40	    to see whether each directory it reads is case sensitive
41	    or not, and performs the matching accordingly.
42	c.  The %T format for printing formatted date/time.
436.	New features in 12/28/93i
44	a.  Most of the built-in commands and ksh itself are now
45            self documenting.  Running command --man will produce
46            screen output.  Running command --html produces the
47            man page in html format.
48	b.  The getopts builtin can process command description
49            strings to produce man pages.
50
517.	Bugs fixed in 12/28/93a for default OPTIONS
52	a.  An expansion bug which causes portions of a word after
53	    a $((...)) expansion that contains a nested $var expansion
54	    to be lost has been fixed.
55	b.  A bug that caused a core dump when a script that did not
56	    have PWD set and did a cd inside command substitution
57	    has been fixed.
58	c.  A bug which caused a core dump on some machines when
59	    the LANG variable was assigned to has been fixed.
60	d.  A bug which incorrectly handled set disciplines that
61	    performed arithmetic evaluation when the discipline
62	    was called from the arithmetic evaluator has been fixed.
63	e.  A bug caused by an EXIT trap inside a function that
64	    was executed in a subshell was fixed.
65	f.  If foo is a function, and not a program, then command foo
66	    now reports that foo isn't found rather than invoking foo.
67	g.  The previous version incorrectly listed -A as an
68	    invocation option.  The -A option is only for set.
69	h.  A bug was fixed which caused ksh to loop when execution trace
70	    was enabled and the PS4 prompt required command substitution.
71	i.  A bug which could cause the job control switch character
72	    to be disabled when a script that enabled monitor mode
73	    terminated was fixed.
74	j.  A bug in the macro expansion global replacement operator //,
75	    when the pattern began with a [ or +( has been fixed.
76	k.  A bug which prevented ~ expansion from occurring when
77	    it was terminated with a colon inside an assignment
78	    has been fixed.
79	l.  A bug in the dot command which prevented autoload functions
80	    from working has been fixed.
81	m.  A bug which caused a variable to be unset if the
82	    its value were expanded inside a set discipline has
83	    been fixed.
84	n.  Whence -a now longer reports that a defined function
85	    is undefined.
86	o.  A bug on some systems in which $0 would be incorrect
87	    in scripts invoked by name has been fixed.
88	p.  Here documents with an empty body now work.
89	1.  A bug which disabled argument passing and resetting
90	    of options for a script invoked by name inside a
91	    function has been fixed.
92	r.  A bug in which an EXIT trap set the caller of a function
93	    would be executed if a command called inside a function
94	    was not found has been fixed.
95	s.  A bug which allowed a script to trap signals that are
96	    ignored at the time that the shell was invoked has
97	    been fixed.
98	t.  A bug which caused 2<&1- when applied to a shell built-in
99	    to leave standard input closed has been fixed.
100	u.  A bug which caused the shell to incorrectly parse
101	    $() command substitutions with nested case statements
102	    has been fixed.
103
1048.	Bugs fixed in 12/28/93b for default OPTIONS
105	a.  A bug which caused unset RANDOM to dump core has been
106	    fixed.
107	b.  A bug which prevented return for terminating a profile
108	    or ENV file has been fixed.
109	c.  A bug which prevented standard input from being
110	    directed to /dev/null for background jobs when
111	    monitor mode was turned off has been fixed.
112	d.  Statements of the form typeset -options var[expr]=value
113	    did not perform substitutions on expr as expected.
114	e.  A bug which prevented the shell from sending a HUP
115	    signal to some background jobs that were not disowned
116	    has been fixed.
117	f.  A bug which allowed a script to trap signals that are
118	    ignored at the time that the shell was invoked by exec
119	    has been fixed.
120	g.  A bug which could cause a core dump when a discipline
121	    function was unset within a discipline was fixed.
122	h.  The typeset builtin now accepts a first argument of
123	    + or - for compatibility with ksh88.
124	i.  For compatibility with ksh88, the results of expansions
125	    of command arguments will treat the extended character
126	    match characters ()|& as ordinary characters.
127	j.  A bug which caused read to fail on a file that was
128	    open for read/write with <> when the first operation
129	    was print or printf has been fixed.
130	k.  When a job is suspended, it is put on the top of
131	    the job list as required by the POSIX standard.
132	l.  The value of OPTARG when an option that required
133	    an argument but didn't have one was incorrect in the
134	    case the the option string began with a :.
135	m.  A bug which caused the terminal to get into a bad
136	    state with some KEYBD traps in vi-mode has been fixed.
137	n.  A bug which caused an invalid trap to cause a script
138	    to terminate, rather than just return an error, has
139	    been fixed.
140	o.  Backreferencing sub-expressions in patterns and replacement
141	    strings now works.
142	p.  A bug in chmod which caused the -R option to fail has
143	    been fixed.
144
1459.	Bugs fixed in 12/28/93c for default OPTIONS
146	a.  The expansion of "$@" was incorrect when $1 was the null
147	    string.
148	b.  A bug which could incorrectly report a syntax error in
149	    a backquoted expression when a $ was preceded by \\
150	    has been fixed.
151	c.  A bug which prevented the shell from exiting after
152	    reporting an error when failing to open a script
153	    has been fixed.
154	d.  A bug that could lead to memory corruption when a
155	    large here document that required parameter or command
156	    substitution was expanded has been fixed.
157	e.  A bug that could cause a core dump on some systems
158	    after ksh detected an error when reading a function
159	    has been fixed.
160	f.  A bug which could cause a coprocess to hang when
161	    reading from a process that has terminated has been fixed.
162	g.  A bug which caused a script to terminate when set -e
163	    was on and the first command of and && or || list
164	    failed has been fixed.
165	h.  A bug with here documents inside $(...) when the delimiter
166	    word is an identifier has been fixed.
167	i.  A bug which caused $0 to display the wrong value when
168	    a script was invoked as an argument to the . command
169	    and the eval command has been fixed.
170	j.  A bug that could cause the built-in sleep to hang
171	    has been fixed.
172	k.  A bug introduces in 12/28/93b which caused the backslash
173	    to be removed when it was followed by digit inside double
174	    quotes in some instances has been fixed.
175	l.  A bug which could cause a core dump if ksh was invoked with
176	    standard input closed has been fixed.
177	m.  A bug which could cause a core dump if typeset -A was
178	    specified for an existing variable has been fixed.
179	n.  Variables that were unset but had attributes such as readonly
180	    and export were not listed with readonly, export and typeset.
181	o.  Several problems with signals have been fixed.
182	p.  A bug which prevented ulimit -t from working has been fixed.
183	    Also, a bug in which failed ulimits could cause a core dump
184	    has also been fixed.
185	q.  A bug in expansion of the form ${name/#pattern/string} and
186	    ${name/%pattern/string} has been fixed.
187	r.  A bug which caused read -r on a line that contained only
188	    blanks to get a non-null value has been fixed.
189	s.  A bug introduced in the 'a' point release in which
190	    ${x='\\'} expanded to \ when x was unset has been fixed.
191	t.  A bug which prevented a trap on EXIT from being executed
192	    when the last command in a script was a function invocation
193	    has been fixed.
194	u.  A bug which caused an interactive shell ignore input when
195	    standard error was redirected to a file with exec,
196	    and then restored with exec 2>&1 has been fixed.
197	v.  An interactive shell turns on monitor mode even when
198	    standard error has been redirected to a file.
199	w.  A bug which could cause standard input to be incorrectly
200	    positioned for the last command of a script has been fixed.
201	y.  A bug in the edit modes which allowed walking back in
202	    the history file for more than HISTSIZE commands has
203	    beed fixed.
204	z.  A bug which could cause a core dump if variable TMPDIR was
205	    changed between two command substitutions has been fixed.
206	aa. A bug which prevented a trap on EXIT from being cleared
207	    has been fixed.
208
20910.	Bugs fixed in 12/28/93d for default OPTIONS
210	a.  The \ character was not handled correctly in replacement
211	    patterns with ${x/pattern/replace}.
212	b.  A bug with read in which the line did not end with
213	    a new-line has been fixed.
214	c.  A bug in file name generation which sometimes
215	    appended a . for filenames that ended in / has
216	    been fixed.
217	d.  If a process is waited for after a status has
218	    been returned by a previous wait, wait now
219	    returns 127.
220	e.  A bug with hist (fc) -e which prevented a command
221	    to re-executed after it had been edited has been fixed.
222	f.  A bug which prevented quoting from removing the meaning
223	    of unary test operators has been fixed.
224
22511.	Bugs fixed in 12/28/93e for default OPTIONS
226	a.  Empty command substitutions of the form $() now work.
227	b.  whence -v foo now gives the correct result after calling
228	    builtin -d foo.
229	c.  A bug in right to left arithmetic assignment for which
230	    the arithmetic expression (( y = x = 1.5 )) did not
231	    yield 1 for y when x was declared typeset -i was fixed.
232	d.  printf has been fixed to handle format  containing \0
233	    and/or \0145 correctly.  In addition, characters following
234	    %b in the format string are no longer displayed when
235	    the operand contains \c.
236	e.  A bug in printf that could cause the %E format to
237	    produce unnormalized results has been fixed.
238	f.  A bug which causes some arithmetic expressions to be
239	    incorrectly evaluated as integer expressions rather
240	    that floating point has been fixed.
241	g.  Functions defined inside a subshell no longer remain
242	    defined when the subshell completes.
243	h.  The error message from sh -c ';echo foo' has been
244	    corrected.
245	i.  The format for umask -S has been changed to agree
246	    with the specification in the POSIX standard.
247	j.  A bug that caused side effects in subscript evaluation
248	    when tracing was enabled for subscripts using ++ or --
249	    has been fixed.
250	k.  To conform to the Posix standard getopts has been changed
251	    so that the option char is set to ? when it returns with
252	    a non-zero exit status.
253	l.  The handling of \} inside ${name...} has been fixed so
254	    that the \ quotes the }.
255	m.  A bug that caused the read builtin to resume execution
256	    after processing a trap has been fixed.
257	n.  [[ -s file ]] has been fixed so that if file is open
258	    by ksh, it is flushed first.
259	o.  In some cases attributes and sizes for non exported
260	    variables weren't being reset before running a script.
261	p.  The value of TMOUT was affected by changes make to
262	    it in a subshell.
263	q.  The jobs command did not reflect changes make by
264	    sending the CONT signal to a command.
265	r.  The error message for ksh -o unknown was incorrect.
266	s.  Functions invoked as name=value name, did not use
267	    values from the calling scope when evaluating value.
268	t.  A bug in which the shell would reexecute previously
269	    executed code when a shell script or coprocess was
270	    run in the background has been fixed.
271	u.  A bug in which an empty here-document would leave
272	    a file descriptor open has been fixed.
273	v.  A bug in which $(set -A array ...) would leave a
274	    side effect has been fixed.
275	w.  A discipline function for a global variable defined
276	    within a function defined with the function keyword,
277	    incorrectly created a local variable of the same name
278	    and applied the discipline to it.
279
28012.	Bugs fixed in 12/28/93f for default OPTIONS
281	a.  A bug which would cause the secondary prompt to be
282	    displayed when a user entered a literal carriage
283	    return has been fixed.
284	b.  I bug which caused ksh read -s name to core dump was
285	    fixed.
286	c.  I bug with the expansion of \} and \] inside double
287	    quoted strings that also contained variable expansions
288	    has been fixed
289	d.  Changes in the 'e' point release caused autoload
290	    functions invoked from within command substitution
291	    to fail.  This has been fixed.
292	e.  A bug in the processing of here-documents that could
293	    prevent variable substitution to occur after $(...) command
294	    substitution for long here documents has been fixed.
295	f.  A bug caused by a race condition that could cause SIGTERM
296	    to be ignored by a child process has been fixed.
297	g.  A bug which prevented the startup of a coprocess immediately
298	    after killing a running coprocess has been fixed.
299	h.  ulimit foobar, where foobar is not an arithmetic
300	    expression, now gives an error message as it did with ksh88
301	    instead of setting the file size limit to 0.
302	i.  A bug which could cause an interactive shell to terminate when
303	    the last process of a pipeline was a POSIX function was fixed.
304	j.  A bug which could cause command substitution of a shell script
305	    to core dump has been fixed.
306	k.  A security hole was fixed in suid_exec.
307	l.  Arithmetic functions such as pow() that take more than
308	    one argument, did not work if arguments other than the
309	    first contained parenthesized sub-expression.
310	m.  The error message from a script containing an incomplete
311	    arithmetic expression has been corrected.
312	n.  A bug which caused a core dump on some machines when
313	    the value of a name reference contained a positional
314	    parameter and the name reference was not defined inside
315	    a function has been fixed.
316	o.  Arithmetic expressions now correctly handle hexidecimal
317	    constants.
318	p.  A bug in which integer variables could be expanded
319	    with a leading 10# when declared with typeset -i
320	    multiple times has been corrected.
321	q.  A bug in which IFS wasn't correctly restored when
322	    set within command substitution has been fixed.
323	r.  The _ character is now considered as part of a word
324	    with the M-f and M-b emacs directives as it was in ksh88.
325
32613.	Bugs fixed in 12/28/93g for default OPTIONS
327	a.  A bug in which a name reference could be created to
328	    itself and later cause the shell to get into an infinite
329	    loop has been fixed.
330	b.  A bug in shcomp relating to compound variables was fixed.
331	c.  A bug introduced in 'e' in which leading 0's in -Z
332	    fields caused the value to be treated as octal for arithmetic
333	    evaluation has been fixed.
334	d.  A bug when a name reference with a shorter name than
335            the variable it references was the subject of a compound
336	    assignment has been fixed.
337	e.  A bug which in which assignment to array variables in
338	    a subshell could effect the parent shell has been
339	    fixed.
340	f.  read name?prompt was putting a 0 byte at the end of the
341	    prompt on standard error.
342	g.  A bug in [[ string1 > string2 ]] when ksh was run with -x
343	    has been fixed.
344	k.  A bug in which the escape character was not processed
345	    correctly inside {...} when brace expansion is enabled
346	    has been fixed, for example {\$foo}.
347	l.  A bug in line continuation in here-documents has been
348	    fixed.
349	m.  The default base when not specified with typeset -i is
350	    10 in accordance with the documentation.  Previously,
351	    the value was determined by the first assignment.
352	n.  A parsing bug in which a # preceded alphanumeric
353	    characters inside a command substitution caused
354	    a syntax error to be reported has been fixed.
355	o.  A bug in which a decimal constant represented as 10#ddd
356	    where ddd was more than five digits generated a syntax
357	    error has been fixed.
358	p.  A bug in here document expansion in which ${...} expansions
359	    were split across buffer boundaries has been fixed.
360
36114.	Bugs fixed in 12/28/93h for default OPTIONS
362	a.  I bug in shcomp for compilation of unary operators with [[...]]
363	    has been fixed.
364	b.  A bug in which the value of $? was changed when executing
365	    a keyboard trap has been fixed.
366	c.  The handling of SIGCHLD has been changed so that the
367	    trap is not triggered while executing trap commands
368	    to avoid recursive trap calls.
369	d.  I bug in which a local variable in a function declared readonly
370	    would generated an error when the function went out of
371	    scope has been fixed.
372	e.  I bug in which \<new_line> entered from the keyboard
373	    with the KEYBD trap enabled has been fixed.
374	f.  The error message for a misplaced ((, for example print ((3),
375	    was often garbled and has been fixed.
376	g.  I bug in the KEYBD trap in which escape sequences of the form
377	    <ESC>[#~ were not being handled as a unit has been fixed.
378	h.  A bug in which ksh would consider expressions like [[ (a) ]]
379	    as syntax errors has been fixed.
380	i.  A function defined as foo() without a function body
381	    was not reported as a syntax error.
382	j.  A bug in which ksh could run out of file descriptors when
383	    a stream was repeatedly opened with exec and read from
384	    has been fixed.
385	k.  A bug introduced when fixing item n from the 'g' point
386	    release has been fixed.
387
38815.	Bugs fixed in 12/28/93i for default OPTIONS
389        a.  A bug in which a script could terminate when getopts
390            encountered an error when invoked inside a function
391            has been fixed.
392        b.  When a symbolic link was specified as the name of
393            the script to invoke by name, the value of $0 was
394            set to the real file name rather than the link name
395            in some cases and this has been fixed.
396
39716.	Bug fixes for specific non-default option combinations.
398	a.  More signal names have been added for Solaris
399	b.  A bug fixed for the v directive in vi MULTIBYTE has been
400	    fixed.
401	c.  Code to for IFS handling of multibyte characters has
402	    been added.
403	d.  The displaying of multibyte strings in export, readonly,
404	    typeset, and execution traces has been fixed.
405	e.  A bug with type ahead and KEYBOARD traps with the
406	    MULTIBYTE option set has been fixed.
407	f.  The k-shell information abstraction database option, KIA,
408	    has been revamped for the 'e' point release.
409	g.  A bug in brace pattern expansions that caused expressions
410	    such as {foo\,bar,bam} to expand incorrectly have been fixed.
411	h.  On the U/WIN version for Window 95 and Windows NT,
412	    when a directory beginning with a letter followed by
413	    a colon is given to cd, it is assumed to be an absolute
414	    directory.
415	i.  There was a bug in the compile option that does not
416	    use fork() in which the current option settings where
417	    not propagated to sub-shells.
418	j.  A bug in setting .sh.editchar during the KEYBD trap
419	    for the MULTIBYTE option was fixed in release 'h'.
420	k.  A bug in which the precision given as an argument
421	    to printf was not working has been fixed.
422
42317.	Other changes to 12/28/93[abcdefghi]
424	a.  A couple of minor changes to make adding built-ins easier.
425	b.  Variables inside functions are now statically scoped.
426	    The previous behavior was never documented.
427	c.  A few changes have been made to the name-value library
428	    that affect built-ins that use disciplines.  The
429	    changes allow disciplines to be shared by variables
430	    and should make it possible to add new disciplines
431	    without recompilation.
432	d.  The name-value library interface has undergone significant
433	    change for this revision.  See the new nval.3 man page.
434	e.  Builtin functions can take a third argument which is
435	    a void*.
436	f.  The nv_scan() function can restrict the scope of a walk
437	    to the top scope.  Starting in 'f', nv_scan() has an
438	    additional pointer argument that is passed to each invoked
439	    function.
440	g.  Starting with release 'f', an empty for list behave like
441	    a for list with null expansions.  It produces a warning
442	    message with sh -n.
443	h.  Starting with release 'f' the code has been modified to
444	    work with EBCDIC as well as ASCII.
445	i.  Starting with the release 'g', the name-value pair library
446	    uses the cdt library rather than the hash library.
447	j.  The sh_fun() function now takes third argument which
448	    is an argument list for the invoked discipline function
449	    or built-in.
450	k.  A callback function can be installed which will give
451	    notification of file duplications and file closes.
452
45318.	Incompatibilities with 12/28/93 version.
454	None intentional.
455
456