Up to [cvs.NetBSD.org] / src / bin / sh
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: MAIN
Revision 1.58 / (download) - annotate - [select for diffs], Sun Mar 19 17:55:57 2023 UTC (12 months ago) by kre
Branch: MAIN
CVS Tags: triaxx-drm,
HEAD
Changes since 1.57: +55 -11
lines
Diff to previous 1.57 (colored)
Do a better job handling EACCES errors from exec() calls. If the EACCES is from the namei(), treat it just like ENOENT or ENOTDIR (and if that is the final error, the exit status from a failed exec will be 127). If the EACCES is from the exec() itself, that indicates the file to be run exists, but has no 'x' permission. That's a meaningful error (as distinct from just "yet another PATH element search failure"). While here, return the first meaingful error we encountered while searching PATH, rather than the last (and ENOENT if there are none of those). This change results in some failed command executions returning status 127 now, where they returned 126 before - which better reflects the intent of those values (127 is simply "not found" whereas 126 is "found but couldn't be executed"). We still do nothing to distinguish errors encountered looking up the command name give, with errors encountered (by the kernel) attempting to run an interpreter needed for the exec to succeed (#! line path, or /libexec/ld.elf_so and similar - or anything else of a similar nature).
Revision 1.57 / (download) - annotate - [select for diffs], Tue Nov 16 11:28:29 2021 UTC (2 years, 4 months ago) by kre
Branch: MAIN
CVS Tags: netbsd-10-base,
netbsd-10-0-RC6,
netbsd-10-0-RC5,
netbsd-10-0-RC4,
netbsd-10-0-RC3,
netbsd-10-0-RC2,
netbsd-10-0-RC1,
netbsd-10
Changes since 1.56: +19 -5
lines
Diff to previous 1.56 (colored)
PR bin/56491 Make "hash" exit(!=0) (ie: exit(1)) if it writes an error message to stderr as required by POSIX (it was writing "not found" errors, yet still doing exit(0)). Whether, when doing "hash foobar", and "foobar" is not found as a command (not a built-in, not a function, and not found via a PATH search), that should be considered an error differs between shells. All of the ksh descendant shells say "no", write no error message in this case, and exit(0) if no other errors occur. Other shells (essentially all) do consider it an error, write a message to stderr, and exit(1) when this happens. POSIX isn't clear, the bug report: https://austingroupbugs.net/view.php?id=1460 which is not yet resolved, suggests that the outcome will be that this is to be unspecified. Given the diversity, there might be no other choice. Have a foot in both camps - default to the "other shell" behaviour, but add a -e option (no errors ... applies only to these "not found" errors) to generate the ksh behaviour. Without other errors (like an unknown option, etc) "hash -e anyname" will always exit(0). See the PR for details on how it all works now, or read the updated man page. While here, when hash is in its other mode (reporting what is in the table) check for I/O errors on stdout, and exit(1) (with an error message!) if any occurred. This does not apply to output generated by the -v option when command names are given (that output is incidental). In sh.1 document all of this. Also add documentation for a bunch of other options the hash command has had for years, but which were never documented. And while there, clean up some other sections I noticed needed improving (either formatting or content or both).
Revision 1.56 / (download) - annotate - [select for diffs], Sun Oct 10 08:19:02 2021 UTC (2 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.55: +19 -27
lines
Diff to previous 1.55 (colored)
sh: make find_command simpler Lint complained about the do-while-0 loop that contained a continue. It didn't state the reason for it, but indeed the code looked complicated. Rewrite the code to be less verbose and to use common coding patterns. No functional change.
Revision 1.55 / (download) - annotate - [select for diffs], Tue Feb 16 15:30:12 2021 UTC (3 years, 1 month ago) by kre
Branch: MAIN
CVS Tags: cjep_sun2x-base1,
cjep_sun2x-base,
cjep_sun2x,
cjep_staticlib_x-base1,
cjep_staticlib_x-base,
cjep_staticlib_x
Changes since 1.54: +6 -3
lines
Diff to previous 1.54 (colored)
PR bin/55979 This fixes the MSAN detected reference to an unitialised variable (an unitialised field in a struct) which happens when a command is not found after a PATH search. Aside from skipping some known to be going to fail exec*() calls in some cases, the setting of the relevant field is irrelevant, so this problem makes no practical difference to the shell, or any shell script. XXX (maybe) pullup -9
Revision 1.54 / (download) - annotate - [select for diffs], Sat Aug 1 17:51:18 2020 UTC (3 years, 7 months ago) by kre
Branch: MAIN
Changes since 1.53: +6 -2
lines
Diff to previous 1.53 (colored)
PR bin/55526 Fix a bug that has existed since the "command" command was added in 2003. "command foo" would cause the definition of a function "foo" to be lost (not freed, simply discarded) if "foo" is (in addition to being a function) a filesystem command. The case where "foo" is a builtin was handled. For now, when a function exists with the same name as a filesystem command, the latter can never appear in the command hash table, and when used (which can only be via "command foo", just "foo" finds the function) will always result in a full PATH search. XXX pullup everything (from NetBSD 2.0 onwards). (really -8 and -9)
Revision 1.53 / (download) - annotate - [select for diffs], Wed Jul 25 14:42:50 2018 UTC (5 years, 7 months ago) by kre
Branch: MAIN
CVS Tags: phil-wifi-20200421,
phil-wifi-20200411,
phil-wifi-20200406,
phil-wifi-20191119,
phil-wifi-20190609,
pgoyette-compat-20190127,
pgoyette-compat-20190118,
pgoyette-compat-1226,
pgoyette-compat-1126,
pgoyette-compat-1020,
pgoyette-compat-0930,
pgoyette-compat-0906,
pgoyette-compat-0728,
netbsd-9-base,
netbsd-9-0-RELEASE,
netbsd-9-0-RC2,
netbsd-9-0-RC1,
is-mlppp-base,
is-mlppp
Branch point for: netbsd-9
Changes since 1.52: +32 -10
lines
Diff to previous 1.52 (colored)
Fix several bugs in the command / type builtin ( including PR bin/48499 ) 1. Make command -pv (and -pV) work (which is not as easy as the PR suggests it might be (the "check and cause error" was there because it did not work, not in order to prevent it from working). 2. Stop -v and -V being both used (that makes no sense). 3. Stop the "type" builtin inheriting the args (-pvV) that "command" has (which it did, as when -v -or -V is used with command, it and type are implemented using the same code). 4. make "command -v word" DTRT for sh keywords (was treating them as an error). 5. Require at least one arg for "command -[vV]" or "type" else usage & error. Strictly this should also apply to "command" and "command -p" (no -v) but that's handled elsewhere, so perhaps some other time. Perhaps "command -v" (and -V) should be limited to 1 command name (where "type" can have many) as in the POSIX definitions, but I don't think that matters. 6. With "command -V alias", (or "type alias" which is the same thing), (but not "command -v alias") alter the output format, so we get ll is an alias for: ls -al instead of the old ll is an alias for ls -al (and note there was a space, for some reason, after "for") That is, unless the alias value contains any \n characters, in which case (something approximating) the old multi-line format is retained. Also note: that if code wants to parse/use the value of an alias, it should be using the output of "alias name", not command or type. Note that none of the above affects "command [-p] cmd" (no -v or -V options) only "command -[vV]" and "type". Note also that the changes to eval.[ch] are merely to make syspath() visible in exec.c rather than static in eval.c
Revision 1.52 / (download) - annotate - [select for diffs], Fri Jun 22 11:04:55 2018 UTC (5 years, 8 months ago) by kre
Branch: MAIN
CVS Tags: phil-wifi-base,
pgoyette-compat-0625
Branch point for: phil-wifi
Changes since 1.51: +7 -7
lines
Diff to previous 1.51 (colored)
Deal with ref after free found by ASAN when a function redefines itself, or some other function which is still active. This was a long known bug (fixed ages ago in the FreeBSD sh) which hadn't been fixed as in practice, the situation that causes the problem simply doesn't arise .. ASAN found it in the sh dotcmd tests which do have this odd "feature" in the way they are written (but where it never caused a problem, as the tests are so simple that no mem is ever allocated between when the old version of the function was deleted, and when it finished executing, so its code all remained intact, despite having been freed.) The fix is taken from the FreeBSD sh. XXX -- pullup-8 (after a while to ensure no other problems arise).
Revision 1.51 / (download) - annotate - [select for diffs], Wed Jul 5 19:58:10 2017 UTC (6 years, 8 months ago) by kre
Branch: MAIN
CVS Tags: pgoyette-compat-base,
pgoyette-compat-0521,
pgoyette-compat-0502,
pgoyette-compat-0422,
pgoyette-compat-0415,
pgoyette-compat-0407,
pgoyette-compat-0330,
pgoyette-compat-0322,
pgoyette-compat-0315,
perseant-stdc-iso10646-base,
perseant-stdc-iso10646
Branch point for: pgoyette-compat
Changes since 1.50: +24 -12
lines
Diff to previous 1.50 (colored)
DEBUG changes: convert DEBUG TRACE() calls to new format. ALso, cause exec failures to always cause the shell to exit with status 126 or 127, whatever the cause. 127 is intended for lookup failures (and is used that way), 126 is used for anything else that goes wrong (as in several other shells.) We no longer use 2 (more easily confused with an exit status of the command exec'd) for shell exec failures.
Revision 1.50 / (download) - annotate - [select for diffs], Sat Jun 17 07:22:12 2017 UTC (6 years, 9 months ago) by kre
Branch: MAIN
Changes since 1.49: +12 -6
lines
Diff to previous 1.49 (colored)
Many internal memory management type fixes. PR bin/52302 (core dump with interactive shell, here doc and error on same line) is fixed. (An old bug.) echo "$( echo x; for a in $( seq 1000 ); do printf '%s\n'; done; echo y )" consistently prints 1002 lines (x, 1000 empty ones, then y) as it should (And you don't want to know what it did before, or why.) (Another old one.) (Recently added) Problems with ~ expansion fixed (mem management related). Proper fix for the cwrappers configure problem (which includes the quick fix that was done earlier, but extends upon that to be correct). (This was another newly added problem.) And the really devious (and rare) old bug - if STACKSTRNUL() needs to allocate a new buffer in which to store the \0, calculate the size of the string space remaining correctly, unlike when SPUTC() grows the buffer, there is no actual data being stored in the STACKSTRNUL() case - the string space remaining was calculated as one byte too few. That would be harmless, unless the next buffer also filled, in which case it was assumed that it was really full, not one byte less, meaning one junk char (a nul, or anything) was being copied into the next (even bigger buffer) corrupting the data. Consistent use of stalloc() to allocate a new block of (stack) memory, and grabstackstr() to claim a block of (stack) memory that had already been occupied but not claimed as in use. Since grabstackstr is implemented as just a call to stalloc() this is a no-op change in practice, but makes it much easier to comprehend what is really happening. Previous code sometimes used stalloc() when the use case was really for grabstackstr(). Change grabstackstr() to actually use the arg passed to it, instead of (not much better than) guessing how much space to claim, More care when using unstalloc()/ungrabstackstr() to return space, and in particular when the stack must be returned to its previous state, rather than just returning no-longer needed space, neither of those work. They also don't work properly if there have been (really, even might have been) any stack mem allocations since the last stalloc()/grabstackstr(). (If we know there cannot have been then the alloc/release sequence is kind of pointless.) To work correctly in general we must use setstackmark()/popstackmark() so do that when needed. Have those also save/restore the top of stack string space remaining. [Aside: for those reading this, the "stack" mentioned is not in any way related to the thing used for maintaining the C function call state, ie: the "stack segment" of the program, but the shell's internal memory management strategy.] More comments to better explain what is happening in some cases. Also cleaned up some hopelessly broken DEBUG mode data that were recently added (no effect on anyone but the poor semi-human attempting to make sense of it...). User visible changes: Proper counting of line numbers when a here document is delimited by a multi-line end-delimiter, as in cat << 'REALLY END' here doc line 1 here doc line 2 REALLY END (which is an obscure case, but nothing says should not work.) The \n in the end-delimiter of the here doc (the last one) was not incrementing the line number, which from that point on in the script would be 1 too low (or more, for end-delimiters with more than one \n in them.) With tilde expansion: unset HOME; echo ~ changed to return getpwuid(getuid())->pw_home instead of failing (returning ~) POSIX says this is unspecified, which makes it difficult for a script to compensate for being run without HOME set (as in env -i sh script), so while not able to be used portably, this seems like a useful extension (and is implemented the same way by some other shells). Further, with HOME=; printf %s ~ we now write nothing (which is required by POSIX - which requires ~ to expand to the value of $HOME if it is set) previously if $HOME (in this case) or a user's directory in the passwd file (for ~user) were a null STRING, We failed the ~ expansion and left behind '~' or '~user'.
Revision 1.49 / (download) - annotate - [select for diffs], Wed Jun 7 05:08:32 2017 UTC (6 years, 9 months ago) by kre
Branch: MAIN
Changes since 1.48: +11 -3
lines
Diff to previous 1.48 (colored)
A better LINENO implementation. This version deletes (well, #if 0's out) the LINENO hack, and uses the LINENO var for both ${LINENO} and $((LINENO)). (Code to invert the LINENO hack when required, like when de-compiling the execution tree to provide the "jobs" command strings, is still included, that can be deleted when the LINENO hack is completely removed - look for refs to VSLINENO throughout the code. The var funclinno in parser.c can also be removed, it is used only for the LINENO hack.) This version produces accurate results: $((LINENO)) was made as accurate as the LINENO hack made ${LINENO} which is very good. That's why the LINENO hack is not yet completely removed, so it can be easily re-enabled. If you can tell the difference when it is in use, or not in use, then something has broken (or I managed to miss a case somewhere.) The way that LINENO works is documented in its own (new) section in the man page, so nothing more about that, or the new options, etc, here. This version introduces the possibility of having a "reference" function associated with a variable, which gets called whenever the value of the variable is required (that's what implements LINENO). There is just one function pointer however, so any particular variable gets at most one of the set function (as used for PATH, etc) or the reference function. The VFUNCREF bit in the var flags indicates which func the variable in question uses (if any - the func ptr, as before, can be NULL). I would not call the results of this perfect yet, but it is close.
Revision 1.48 / (download) - annotate - [select for diffs], Sun Jun 4 20:27:14 2017 UTC (6 years, 9 months ago) by kre
Branch: MAIN
Changes since 1.47: +17 -11
lines
Diff to previous 1.47 (colored)
Make cd (really) do cd -P, and not just claim that is what it is doing while doing a half-hearted, broken, partial, version of cd -L instead. The latter (as the manual says) is not supported, what's more, it is an abomination, and should never be supported (anywhere.) Fix the doc so that the pretense that we notice when a path given crosses a symlink (and turns on printing of the destination directory) is claimed no more (that used to be true until late Dec 2016, but was changed). Now the print happens if -o cdprint is set, or if an entry from CDPATH that is not "" or "." is used (or if the "cd dest repl" cd cmd variant is used.) Fix CDPATH processing: avoid the magic '%' processing that is used for PATH and MAILPATH from corrupting CDPATH. The % magic (both variants) remains undocumented. Also, don't double the '/' if an entry in PATH or CDPATH ends in '/' (as in CDPATH=":/usr/src/"). A "cd usr.bin" used to do chdir("/usr/src//usr.bin"). No more. This is almost invisible, and relatively harmless, either way.... Also fix a bug where if a plausible destination directory in CDPATH was located, but the chdir() failed (eg: permission denied) and then a later "." or "" CDPATH entry succeeded, "print" mode was turned on. That is: cd /tmp; mkdir bin mkdir -p P/bin; chmod 0 P/bin CDPATH=/tmp/P: cd bin would cd to /tmp/bin (correctly) but print it (incorrectly). Also when in "cd dest replace" mode, if the result of the replacement generates '-' as the path named, as in: cd $PWD - then simply change to '-' (or attempt to, with CDPATH search), rather than having this being equivalent to "cd -") Because of these changes, the pwd command (and $PWD) essentially always acts as pwd -P, even when called as pwd -L (which is still the default.) That is, even more than it did before. Also fixed a (kind of minor) mem management error (CDPATH related) "whosoever shall padvance must stunalloc before repeating" (and the same for MAILPATH).
Revision 1.47 / (download) - annotate - [select for diffs], Mon May 15 19:55:20 2017 UTC (6 years, 10 months ago) by kre
Branch: MAIN
CVS Tags: prg-localcount2-base3,
netbsd-8-base
Branch point for: netbsd-8
Changes since 1.46: +80 -23
lines
Diff to previous 1.46 (colored)
(Perhaps temporarary) updated "hash" command. New options, and more flexible behaviour.
Revision 1.46 / (download) - annotate - [select for diffs], Tue May 3 17:21:02 2016 UTC (7 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base2,
prg-localcount2-base1,
prg-localcount2-base,
pgoyette-localcount-base,
pgoyette-localcount-20170426,
pgoyette-localcount-20170320,
pgoyette-localcount-20170107,
pgoyette-localcount-20161104,
pgoyette-localcount-20160806,
pgoyette-localcount-20160726,
pgoyette-localcount,
localcount-20160914,
bouyer-socketcan-base1,
bouyer-socketcan-base,
bouyer-socketcan
Branch point for: prg-localcount2
Changes since 1.45: +3 -2
lines
Diff to previous 1.45 (colored)
add missing forward declaration for the STATIC= case.
Revision 1.45 / (download) - annotate - [select for diffs], Fri Nov 1 16:49:02 2013 UTC (10 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9,
tls-maxphys-base,
tls-earlyentropy-base,
tls-earlyentropy,
riastradh-xf86-video-intel-2-7-1-pre-2-21-15,
riastradh-drm2-base3,
netbsd-7-nhusb-base-20170116,
netbsd-7-nhusb-base,
netbsd-7-nhusb,
netbsd-7-base,
netbsd-7-2-RELEASE,
netbsd-7-1-RELEASE,
netbsd-7-1-RC2,
netbsd-7-1-RC1,
netbsd-7-1-2-RELEASE,
netbsd-7-1-1-RELEASE,
netbsd-7-1,
netbsd-7-0-RELEASE,
netbsd-7-0-RC3,
netbsd-7-0-RC2,
netbsd-7-0-RC1,
netbsd-7-0-2-RELEASE,
netbsd-7-0-1-RELEASE,
netbsd-7-0,
netbsd-7
Changes since 1.44: +3 -4
lines
Diff to previous 1.44 (colored)
PR/48312: Dieter Roelands: According to TOG, unset should not return an error for functions are variables that were not previously set: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
Revision 1.44 / (download) - annotate - [select for diffs], Mon Dec 31 14:10:15 2012 UTC (11 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base8,
riastradh-drm2-base2,
riastradh-drm2-base1,
riastradh-drm2-base,
riastradh-drm2,
khorben-n900,
agc-symver-base,
agc-symver
Changes since 1.43: +4 -3
lines
Diff to previous 1.43 (colored)
Add support for '%n' being a shorthand for 'fg %n'.
Revision 1.43 / (download) - annotate - [select for diffs], Tue Mar 20 18:42:29 2012 UTC (12 years ago) by matt
Branch: MAIN
CVS Tags: yamt-pagecache-base7,
yamt-pagecache-base6,
yamt-pagecache-base5,
yamt-pagecache-base4
Branch point for: tls-maxphys
Changes since 1.42: +4 -6
lines
Diff to previous 1.42 (colored)
Use C89 function definitions
Revision 1.42 / (download) - annotate - [select for diffs], Thu Oct 16 15:31:05 2008 UTC (15 years, 5 months ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base3,
yamt-pagecache-base2,
yamt-pagecache-base,
netbsd-6-base,
netbsd-6-1-RELEASE,
netbsd-6-1-RC4,
netbsd-6-1-RC3,
netbsd-6-1-RC2,
netbsd-6-1-RC1,
netbsd-6-1-5-RELEASE,
netbsd-6-1-4-RELEASE,
netbsd-6-1-3-RELEASE,
netbsd-6-1-2-RELEASE,
netbsd-6-1-1-RELEASE,
netbsd-6-1,
netbsd-6-0-RELEASE,
netbsd-6-0-RC2,
netbsd-6-0-RC1,
netbsd-6-0-6-RELEASE,
netbsd-6-0-5-RELEASE,
netbsd-6-0-4-RELEASE,
netbsd-6-0-3-RELEASE,
netbsd-6-0-2-RELEASE,
netbsd-6-0-1-RELEASE,
netbsd-6-0,
netbsd-5-base,
netbsd-5-2-RELEASE,
netbsd-5-2-RC1,
netbsd-5-2-3-RELEASE,
netbsd-5-2-2-RELEASE,
netbsd-5-2-1-RELEASE,
netbsd-5-2,
netbsd-5-1-RELEASE,
netbsd-5-1-RC4,
netbsd-5-1-RC3,
netbsd-5-1-RC2,
netbsd-5-1-RC1,
netbsd-5-1-5-RELEASE,
netbsd-5-1-4-RELEASE,
netbsd-5-1-3-RELEASE,
netbsd-5-1-2-RELEASE,
netbsd-5-1-1-RELEASE,
netbsd-5-1,
netbsd-5-0-RELEASE,
netbsd-5-0-RC4,
netbsd-5-0-RC3,
netbsd-5-0-RC2,
netbsd-5-0-RC1,
netbsd-5-0-2-RELEASE,
netbsd-5-0-1-RELEASE,
netbsd-5-0,
netbsd-5,
matt-premerge-20091211,
matt-nb6-plus-nbase,
matt-nb6-plus-base,
matt-nb6-plus,
matt-nb5-pq3-base,
matt-nb5-pq3,
matt-nb5-mips64-u2-k2-k4-k7-k8-k9,
matt-nb5-mips64-u1-k1-k5,
matt-nb5-mips64-premerge-20101231,
matt-nb5-mips64-premerge-20091211,
matt-nb5-mips64-k15,
matt-nb5-mips64,
matt-nb4-mips64-k7-u2a-k9b,
matt-mips64-premerge-20101231,
matt-mips64-base2,
jym-xensuspend-nbase,
jym-xensuspend-base,
jym-xensuspend,
cherry-xenmp-base,
cherry-xenmp,
bouyer-quota2-nbase,
bouyer-quota2-base,
bouyer-quota2
Branch point for: yamt-pagecache,
netbsd-6
Changes since 1.41: +6 -3
lines
Diff to previous 1.41 (colored)
Wrap declaration of a STATIC function that's only conditionally defined in a suitable ifdef, so things still compile if STATIC is defined as "static", which is for some reason not the default. (In the long run STATIC should go away - it might have once been a portability hack but now definitely serves no purpose.)
Revision 1.41 / (download) - annotate - [select for diffs], Fri Feb 15 17:26:06 2008 UTC (16 years, 1 month ago) by matt
Branch: MAIN
CVS Tags: yamt-pf42-baseX,
yamt-pf42-base4,
yamt-pf42-base3,
yamt-pf42-base2,
yamt-pf42-base,
yamt-pf42,
wrstuden-revivesa-base-3,
wrstuden-revivesa-base-2,
wrstuden-revivesa-base-1,
wrstuden-revivesa-base,
wrstuden-revivesa,
mjf-devfs2-base,
mjf-devfs2,
matt-armv6-nbase,
keiichi-mipv6-base,
keiichi-mipv6,
hpcarm-cleanup-nbase,
hpcarm-cleanup-base
Changes since 1.40: +4 -4
lines
Diff to previous 1.40 (colored)
Fix inconsistent definitions
Revision 1.40 / (download) - annotate - [select for diffs], Sun Jun 24 18:36:23 2007 UTC (16 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-base,
matt-mips64,
matt-armv6-prevmlocking,
matt-armv6-base,
hpcarm-cleanup,
cube-autoconf-base,
cube-autoconf
Branch point for: matt-armv6
Changes since 1.39: +5 -2
lines
Diff to previous 1.39 (colored)
PR/36531: Greg A. Woods: another very helpful DEBUG TRACE() call for execve() failures in /bin/sh
Revision 1.39 / (download) - annotate - [select for diffs], Sat Mar 18 05:23:08 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase,
wrstuden-fixsa-base-1,
wrstuden-fixsa-base,
wrstuden-fixsa,
netbsd-4-base,
netbsd-4-0-RELEASE,
netbsd-4-0-RC5,
netbsd-4-0-RC4,
netbsd-4-0-RC3,
netbsd-4-0-RC2,
netbsd-4-0-RC1,
netbsd-4-0-1-RELEASE,
netbsd-4-0,
netbsd-4,
abandoned-netbsd-4-base,
abandoned-netbsd-4
Changes since 1.38: +8 -5
lines
Diff to previous 1.38 (colored)
Coverity CID 890: Possible NULL pointer deref.
Revision 1.38 / (download) - annotate - [select for diffs], Sat Mar 18 05:17:36 2006 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.37: +4 -3
lines
Diff to previous 1.37 (colored)
Coverity CID 1329: Possible NULL deref.
Revision 1.37 / (download) - annotate - [select for diffs], Thu Aug 7 09:05:31 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
CVS Tags: netbsd-3-base,
netbsd-3-1-RELEASE,
netbsd-3-1-RC4,
netbsd-3-1-RC3,
netbsd-3-1-RC2,
netbsd-3-1-RC1,
netbsd-3-1-1-RELEASE,
netbsd-3-1,
netbsd-3-0-RELEASE,
netbsd-3-0-RC6,
netbsd-3-0-RC5,
netbsd-3-0-RC4,
netbsd-3-0-RC3,
netbsd-3-0-RC2,
netbsd-3-0-RC1,
netbsd-3-0-3-RELEASE,
netbsd-3-0-2-RELEASE,
netbsd-3-0-1-RELEASE,
netbsd-3-0,
netbsd-3,
netbsd-2-base,
netbsd-2-1-RELEASE,
netbsd-2-1-RC6,
netbsd-2-1-RC5,
netbsd-2-1-RC4,
netbsd-2-1-RC3,
netbsd-2-1-RC2,
netbsd-2-1-RC1,
netbsd-2-1,
netbsd-2-0-base,
netbsd-2-0-RELEASE,
netbsd-2-0-RC5,
netbsd-2-0-RC4,
netbsd-2-0-RC3,
netbsd-2-0-RC2,
netbsd-2-0-RC1,
netbsd-2-0-3-RELEASE,
netbsd-2-0-2-RELEASE,
netbsd-2-0-1-RELEASE,
netbsd-2-0,
netbsd-2
Changes since 1.36: +3 -7
lines
Diff to previous 1.36 (colored)
Move UCB-licensed code from 4-clause to 3-clause licence. Patches provided by Joel Baker in PR 22249, verified by myself.
Revision 1.36 / (download) - annotate - [select for diffs], Tue Feb 4 08:51:30 2003 UTC (21 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.35: +10 -5
lines
Diff to previous 1.35 (colored)
Fix bin/20185 - builtin called from function of same name mustn't be hashed. Make 'hash' only report utilities that are not builtins (posix), the non-posix 'hash -v' will report everything. (agreed by christos)
Revision 1.35 / (download) - annotate - [select for diffs], Wed Jan 22 20:36:04 2003 UTC (21 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.34: +134 -52
lines
Diff to previous 1.34 (colored)
Support command -p, -v and -V as posix Stop temporary PATH assigments messing up hash table Fix sh -c -e "echo $0 $*" -a x (as posix) (agreed by christos)
Revision 1.34 / (download) - annotate - [select for diffs], Sun Nov 24 22:35:39 2002 UTC (21 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.33: +115 -93
lines
Diff to previous 1.33 (colored)
Fixes from David Laight: - ansification - format of output of jobs command (etc) - job identiers %+, %- etc - $? and $(...) - correct quoting of output of set, export -p and readonly -p - differentiation between nornal and 'posix special' builtins - correct behaviour (posix) for errors on builtins and special builtins - builtin printf and kill - set -o debug (if compiled with DEBUG) - cd src obj (as ksh - too useful to do without) - unset -e name, remove non-readonly variable from export list. (so I could unset -e PS1 before running the test shell...)
Revision 1.33 / (download) - annotate - [select for diffs], Fri Sep 27 18:56:50 2002 UTC (21 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.32: +18 -7
lines
Diff to previous 1.32 (colored)
VFork()ing shell: From elric@netbsd.org: Plus my changes: - walking process group fix in foregrounding a job. - reset of process group in parent shell if interrupted before the wait. - move INTON lower in the dowait so that the job structure is consistent. - error check all setpgid(), tcsetpgrp() calls. - eliminate unneeded strpgid() call. - check that we don't belong in the process group before we try to set it.
Revision 1.32 / (download) - annotate - [select for diffs], Sun Feb 4 19:52:06 2001 UTC (23 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-6-base,
netbsd-1-6-RELEASE,
netbsd-1-6-RC3,
netbsd-1-6-RC2,
netbsd-1-6-RC1,
netbsd-1-6-PATCH002-RELEASE,
netbsd-1-6-PATCH002-RC4,
netbsd-1-6-PATCH002-RC3,
netbsd-1-6-PATCH002-RC2,
netbsd-1-6-PATCH002-RC1,
netbsd-1-6-PATCH002,
netbsd-1-6-PATCH001-RELEASE,
netbsd-1-6-PATCH001-RC3,
netbsd-1-6-PATCH001-RC2,
netbsd-1-6-PATCH001-RC1,
netbsd-1-6-PATCH001,
netbsd-1-6,
ELRICshvfork-base
Branch point for: ELRICshvfork
Changes since 1.31: +3 -3
lines
Diff to previous 1.31 (colored)
remove redundant declarations and nexted externs.
Revision 1.31 / (download) - annotate - [select for diffs], Wed Nov 1 19:21:41 2000 UTC (23 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.30: +16 -13
lines
Diff to previous 1.30 (colored)
handle type command on names that contain slashes, and print a : in the not found case. From FreeBSD.
Revision 1.30 / (download) - annotate - [select for diffs], Mon Jul 3 03:26:19 2000 UTC (23 years, 8 months ago) by matt
Branch: MAIN
Changes since 1.29: +4 -4
lines
Diff to previous 1.29 (colored)
include <stdlib.h>, <string.h>, or whatever as appropriate to shut up gcc 2.96
Revision 1.29 / (download) - annotate - [select for diffs], Mon May 22 10:18:46 2000 UTC (23 years, 10 months ago) by elric
Branch: MAIN
CVS Tags: netbsd-1-5-base,
netbsd-1-5-BETA,
netbsd-1-5-ALPHA2,
minoura-xpg4dl-base,
minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.28: +5 -16
lines
Diff to previous 1.28 (colored)
Back out previous vfork changes.
Revision 1.28 / (download) - annotate - [select for diffs], Sat May 13 20:50:14 2000 UTC (23 years, 10 months ago) by elric
Branch: MAIN
Changes since 1.27: +18 -7
lines
Diff to previous 1.27 (colored)
Now we use vfork(2) instead of fork(2) when we can.
Revision 1.27 / (download) - annotate - [select for diffs], Fri Jul 9 03:05:49 1999 UTC (24 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: wrstuden-devbsize-base,
wrstuden-devbsize-19991221,
wrstuden-devbsize,
comdex-fall-1999-base,
comdex-fall-1999
Changes since 1.26: +33 -31
lines
Diff to previous 1.26 (colored)
compile with WARNS = 2
Revision 1.26 / (download) - annotate - [select for diffs], Tue Jul 28 11:41:54 1998 UTC (25 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-4-base,
netbsd-1-4-RELEASE,
netbsd-1-4-PATCH003,
netbsd-1-4-PATCH002,
netbsd-1-4-PATCH001,
netbsd-1-4
Changes since 1.25: +4 -3
lines
Diff to previous 1.25 (colored)
Be more retentive about use of NOTREACHED and noreturn.
Revision 1.25 / (download) - annotate - [select for diffs], Tue Jul 28 05:31:27 1998 UTC (25 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +3 -3
lines
Diff to previous 1.24 (colored)
Delint.
Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 20 21:27:36 1997 UTC (26 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-3-base,
netbsd-1-3-RELEASE,
netbsd-1-3-PATCH003-CANDIDATE2,
netbsd-1-3-PATCH003-CANDIDATE1,
netbsd-1-3-PATCH003-CANDIDATE0,
netbsd-1-3-PATCH003,
netbsd-1-3-PATCH002,
netbsd-1-3-PATCH001,
netbsd-1-3-BETA,
netbsd-1-3
Changes since 1.23: +31 -11
lines
Diff to previous 1.23 (colored)
PR/3888: Chris Demetriou: type command-with-slash prints $PATH[0]/command-with-slash...
Revision 1.23 / (download) - annotate - [select for diffs], Fri Jul 4 21:01:59 1997 UTC (26 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.22: +4 -3
lines
Diff to previous 1.22 (colored)
Fix compiler warnings.
Revision 1.22 / (download) - annotate - [select for diffs], Thu Feb 6 23:24:52 1997 UTC (27 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.21: +77 -2
lines
Diff to previous 1.21 (colored)
add type builtin.
Revision 1.21 / (download) - annotate - [select for diffs], Sat Jan 11 02:04:31 1997 UTC (27 years, 2 months ago) by tls
Branch: MAIN
Changes since 1.20: +5 -5
lines
Diff to previous 1.20 (colored)
kill 'register'
Revision 1.20 / (download) - annotate - [select for diffs], Sat Oct 19 02:38:36 1996 UTC (27 years, 5 months ago) by abrown
Branch: MAIN
Changes since 1.19: +3 -3
lines
Diff to previous 1.19 (colored)
Remove leftover printf("here") from last change.
Revision 1.19 / (download) - annotate - [select for diffs], Wed Oct 16 14:35:45 1996 UTC (27 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.18: +20 -6
lines
Diff to previous 1.18 (colored)
PR/287: Shell does not exit with 126/127 when permission denied/ command not found. Add extra exception type and generalize error handling routines to take that exception type. Use a global variable exerrno to keep the last exec error.
Revision 1.18 / (download) - annotate - [select for diffs], Tue Jun 25 16:40:38 1996 UTC (27 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.17: +4 -4
lines
Diff to previous 1.17 (colored)
const poisoning.
Revision 1.17 / (download) - annotate - [select for diffs], Fri Jun 9 01:53:50 1995 UTC (28 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base,
netbsd-1-2-RELEASE,
netbsd-1-2-BETA,
netbsd-1-1-base,
netbsd-1-1-RELEASE,
netbsd-1-1-PATCH001,
netbsd-1-1
Branch point for: netbsd-1-2
Changes since 1.16: +4 -5
lines
Diff to previous 1.16 (colored)
Changed so that 'PATH=newpath command' works, instead of looking at the old path. Synced input.c with vangogh.
Revision 1.16 / (download) - annotate - [select for diffs], Thu May 11 21:29:02 1995 UTC (28 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.15: +25 -29
lines
Diff to previous 1.15 (colored)
Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0 bug.
Revision 1.15 / (download) - annotate - [select for diffs], Tue Mar 21 09:08:59 1995 UTC (29 years ago) by cgd
Branch: MAIN
Changes since 1.14: +7 -2
lines
Diff to previous 1.14 (colored)
convert to new RCS id conventions.
Revision 1.14 / (download) - annotate - [select for diffs], Mon Jan 30 19:38:05 1995 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.13: +2 -2
lines
Diff to previous 1.13 (colored)
Use S_IS*().
Revision 1.13 / (download) - annotate - [select for diffs], Sun Jan 15 09:29:16 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.12: +3 -11
lines
Diff to previous 1.12 (colored)
Remove the gratuitous `security' warning.
Revision 1.12 / (download) - annotate - [select for diffs], Mon Dec 5 19:07:39 1994 UTC (29 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.11: +17 -8
lines
Diff to previous 1.11 (colored)
clean up further. more patches from Jim Jegers
Revision 1.11 / (download) - annotate - [select for diffs], Fri Sep 23 11:28:40 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +2 -2
lines
Diff to previous 1.10 (colored)
Eliminate uses of some obsolete functions.
Revision 1.10 / (download) - annotate - [select for diffs], Sat Jun 11 16:11:52 1994 UTC (29 years, 9 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-0-base,
netbsd-1-0-RELEASE,
netbsd-1-0-PATCH1,
netbsd-1-0-PATCH06,
netbsd-1-0-PATCH05,
netbsd-1-0-PATCH04,
netbsd-1-0-PATCH03,
netbsd-1-0-PATCH02,
netbsd-1-0-PATCH0,
netbsd-1-0
Changes since 1.9: +2 -1
lines
Diff to previous 1.9 (colored)
Add RCS ids.
Revision 1.9 / (download) - annotate - [select for diffs], Thu May 12 17:03:36 1994 UTC (29 years, 10 months ago) by jtc
Branch: MAIN
Changes since 1.8: +1 -0
lines
Diff to previous 1.8 (colored)
Include appropriate header files to bring function prototypes into scope.
Revision 1.8 / (download) - annotate - [select for diffs], Wed May 11 17:09:55 1994 UTC (29 years, 10 months ago) by jtc
Branch: MAIN
Changes since 1.7: +41 -45
lines
Diff to previous 1.7 (colored)
sync with 4.4lite
Revision 1.7 / (download) - annotate - [select for diffs], Fri Apr 1 01:19:25 1994 UTC (29 years, 11 months ago) by jtc
Branch: MAIN
Changes since 1.6: +2 -2
lines
Diff to previous 1.6 (colored)
Getgroup's second argument is now a gid_t ptr.
Revision 1.6 / (download) - annotate - [select for diffs], Thu Sep 23 23:32:19 1993 UTC (30 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +5 -2
lines
Diff to previous 1.5 (colored)
Root can execute anything with at least one execute bit set.
Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 1 18:58:17 1993 UTC (30 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +2 -2
lines
Diff to previous 1.4 (colored)
Add RCS identifiers.
Revision 1.4 / (download) - annotate - [select for diffs], Sat Apr 10 14:55:52 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1,
netbsd-0-9-base,
netbsd-0-9-RELEASE,
netbsd-0-9-BETA,
netbsd-0-9-ALPHA2,
netbsd-0-9-ALPHA,
netbsd-0-9,
netbsd-0-8
Changes since 1.3: +25 -2
lines
Diff to previous 1.3 (colored)
from "Andrew A. Chernov, Black Mage" <ache@astral.msk.su> When sh tried to find_command() for execution (without full path), it checked ONLY ONE current effective group execution permissions, but didn't check another valid groups from /etc/group.
Revision 1.3 / (download) - annotate - [select for diffs], Tue Mar 23 00:27:54 1993 UTC (31 years ago) by cgd
Branch: MAIN
Changes since 1.2: +1 -1
lines
Diff to previous 1.2 (colored)
changed "Id" to "Header" for rcsids
Revision 1.2 / (download) - annotate - [select for diffs], Mon Mar 22 08:04:00 1993 UTC (31 years ago) by cgd
Branch: MAIN
Changes since 1.1: +1 -0
lines
Diff to previous 1.1 (colored)
added rcs ids to all files
Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: MAIN
Initial revision