elric
e6bccfe4be
Back out previous vfork changes.
2000-05-22 10:18:46 +00:00
elric
756a2ca1bd
Now we use vfork(2) instead of fork(2) when we can.
2000-05-13 20:50:14 +00:00
simonb
d2f6a4723d
Include <errno.h> instead of using "extern int errno;".
2000-04-14 05:54:20 +00:00
christos
d6ac7627ea
Fix bin/9184, bin/9194, bin/9265, bin/9266
...
Exitcode and negation problems (From Martin Husemann)
2000-01-27 23:39:38 +00:00
christos
3d42469030
compile with WARNS = 2
1999-07-09 03:05:49 +00:00
christos
832949b912
When we execute commands from a shell script, make sure that the signals
...
are being caught (reported by Alexis Rosen), similar to the -c case.
#!/bin/sh
vi "$@"
^C when the script is running...
1999-03-27 13:46:19 +00:00
christos
1666f88d5d
Fix the -c problem differently. We cannot just ignore SIGINT etc, otherwise
...
we cannot interrupt sh -c <command>
1999-02-05 21:21:27 +00:00
christos
dd65252560
PR/1788: Shinya Taniguchi: sh -c does not setup signals properly.
...
[Reminded to me by Alexis Rosen -- thx!]
1999-02-04 11:20:40 +00:00
cjs
9063efaca0
Add -q option, which when used with -v and/or -x, turns off the tracing
...
during the execution of /etc/profile, .profile and $ENV.
1999-02-04 00:27:07 +00:00
itohy
362c3e31c9
The builtin . (dot) command no longer sees the current working directory
...
even if the specified file is not in the PATH.
This change enforces security and makes it conform to POSIX.
Closes PR #6794 .
I thought Christos committed this but not appeared yet. :)
The setstackmark()/popstackmark() pair in dotcmd(), used for freeing
stack storage possibly allocated by find_dot_file(), is redundant for now
since dotcmd() is surrounded by another pair in evalcommand().
This redundancy, however, may help future modifications
(suggested by Christos).
1999-02-02 15:49:52 +00:00
mycroft
ee9e50eacb
Be more retentive about use of NOTREACHED and noreturn.
1998-07-28 11:41:40 +00:00
mycroft
9dc385beb1
Delint.
1998-07-28 05:31:22 +00:00
christos
cd799663e4
Fix compiler warnings.
1997-07-04 21:01:48 +00:00
christos
23745b89db
Don't call getpwd() because if that fails the shell cannot start. (from scott)
1997-04-11 23:01:44 +00:00
christos
2a9c11dd53
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.
1996-10-16 14:35:42 +00:00
christos
ff008dabf6
Fix PR/1760, where 'cd -' before any other command could cause a reference
...
to an uninitialized pointer. Use getcwd() to get the current working directory,
instead of forking /bin/pwd [per Scott's suggestion]
1995-11-19 23:27:37 +00:00
christos
f9382bca1a
Fix return builtin to work like it does in ksh:
...
When not in a function, it skips the rest of the current input file.
Instances of `return' outside function definitions were previously ignored.
What does joe posix have to say about this?
[fixes PR/1444]
1995-09-11 17:05:41 +00:00
christos
782cb68126
Fix bin/1240, from Dennis Ferguson. the exit builtin with no arguments
...
should return the exitcode of the previous command but it always returned 0.
1995-07-20 15:04:16 +00:00
christos
58e18fc330
Fixed bug where
...
$ cat foo
echo $FOO
$ FOO=1 . ./foo
$ echo $FOO
Did not echo 1 at all. Now variable assignments before sourced scripts
are honored during and after the execution of the script.
1995-05-28 18:09:48 +00:00
christos
4fb6f609aa
Changed so that syntax errors (EXERROR) set the exit status to 2,
...
and commands that are not found set the exit status to 1 like all
other bourne shells.
[It used to be 0 and 2 respectively]
1995-05-19 15:08:55 +00:00
christos
07bae7eddd
Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
...
bug.
1995-05-11 21:28:33 +00:00
cgd
49f0ad8601
convert to new RCS id conventions.
1995-03-21 09:01:59 +00:00
cgd
4ce0d34a31
clean up further. more patches from Jim Jegers
1994-12-05 19:07:32 +00:00
cgd
5dad143982
from James Jegers <jimj@miller.cs.uwm.edu>: quiet -Wall, and squelch
...
some of the worst style errors.
1994-12-04 07:11:37 +00:00
jtc
8cc67c8556
Don't source the file specified by $ENV if either the real and effective
...
user IDs or the real and effective group IDs of the process are different.
Thanks to Mark Weaver who pointed this out in PR 262.
1994-08-03 16:25:26 +00:00
mycroft
cafd1f7e9f
Add RCS ids.
1994-06-11 16:11:35 +00:00
jtc
a81e412494
Include appropriate header files to bring function prototypes into scope.
1994-05-12 17:03:32 +00:00
jtc
a3f60d8978
forgot some include files
1994-05-11 17:54:32 +00:00
jtc
52a20605b9
integrate NetBSD's path searching for dot files
1994-05-11 17:47:12 +00:00
jtc
37ed7877b2
sync with 4.4lite
1994-05-11 17:09:42 +00:00
jtc
036641804e
Removed theo's change to check S_ISLNK() for dot commands. This is
...
unnecessary, since stat() allready resolves symlinks (and fails, if
the link is broken).
1994-01-26 19:50:03 +00:00
deraadt
d7b3f4d90a
source/$PATH thing for symbolic links too, reportedly
1994-01-25 21:05:34 +00:00
deraadt
90ac3da053
but don't try that for absolute or relative paths
1994-01-25 08:16:00 +00:00
deraadt
be0472fcd1
make . (source) command search $PATH as it should. from dkionka@Cadence.COM (Daniel P. Kionka) and fixed by me
1994-01-25 07:59:25 +00:00
mycroft
8542364e07
Add RCS identifiers.
1993-08-01 18:49:50 +00:00
cgd
06be60083d
changed "Id" to "Header" for rcsids
1993-03-23 00:22:59 +00:00
cgd
346aa5dd48
added rcs ids to all files
1993-03-22 08:04:00 +00:00
cgd
61f282557f
initial import of 386bsd-0.1 sources
1993-03-21 09:45:37 +00:00