History log of /netbsd-src/bin/sh/eval.c (Results 126 – 150 of 197)
Revision Date Author Comments
# 53ed48f3 23-Jan-2003 agc <agc@NetBSD.org>

Make this build on platforms where size_t != int, i.e. sparc, arm, ppc, ...


# 0923f4be 23-Jan-2003 rafal <rafal@NetBSD.org>

Make this build again.


# e314f958 22-Jan-2003 dsl <dsl@NetBSD.org>

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)


# 1aafd1a4 25-Nov-2002 agc <agc@NetBSD.org>

Include <stdio.h> to get the prototype for sprintf(3) - macppc needs this.


# c02b3bbd 24-Nov-2002 christos <christos@NetBSD.org>

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
- differentia

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...)

show more ...


# dde74268 23-Oct-2002 christos <christos@NetBSD.org>

From David Laight
> The wrong process is aborting when variable assignment fails
> in the vfork path. So the following command fails to execute
> the second echo (shown here with the correct output)

From David Laight
> The wrong process is aborting when variable assignment fails
> in the vfork path. So the following command fails to execute
> the second echo (shown here with the correct output).
>
> $ (readonly r; r= /bin/echo a; echo b)
> r: is read only
> b
>
> fix: defer the mklocal() to the child shell.

show more ...


# 6166cc6e 23-Oct-2002 christos <christos@NetBSD.org>

Fix interrupt problam from David Laight

$ /fred # non existant command
$ ^C # stops working

He says:
Ok the extra INTOFF is the one in exverror().
In almost all cases this doesn't matter be

Fix interrupt problam from David Laight

$ /fred # non existant command
$ ^C # stops working

He says:
Ok the extra INTOFF is the one in exverror().
In almost all cases this doesn't matter because the longjmp()s
all end up in main() and the FORCEINTON call sorts it out
for the next command.
(There are a significant number of INTON/OFF mismatches through
the error paths...)

In any case the above failure can be 'fixed' by changing 2 (I think
they are both needed) INTON calls to FORCEINTON within evalcommand.
The following patch seems to work:

We should really look in the code and fix the INTON->INTOFF pairs.

show more ...


# 4783843f 28-Sep-2002 christos <christos@NetBSD.org>

Revert previous change. No need to save rootshell. It is only affecting
the non-vfork case. Having said that, it would be nice if pipelines of
simple commands were vforked too. Right now they are not

Revert previous change. No need to save rootshell. It is only affecting
the non-vfork case. Having said that, it would be nice if pipelines of
simple commands were vforked too. Right now they are not.
Explain that setpgid() might fail because we are doing it both in the
parent and the child case, because we don't know which one will come
first.
Suspending a pipeline prints %1 Suspended n times where n is the number
of processes, but that was there before. It is easy to fix, but I'll
leave the code alone for now.

show more ...


# 6f482334 27-Sep-2002 christos <christos@NetBSD.org>

Deal with rootshell not being maintained correctly in the vfork() case.
Propagate isroot, throughout the eval process and maintain it properly.
Fixes sleep 10 | cat^C not exiting because sleep and ca

Deal with rootshell not being maintained correctly in the vfork() case.
Propagate isroot, throughout the eval process and maintain it properly.
Fixes sleep 10 | cat^C not exiting because sleep and cat ended up in
their own process groups, because wasroot was always true in the children.

show more ...


# d84d3616 27-Sep-2002 mycroft <mycroft@NetBSD.org>

Clean up INTOFF/INTON usage a little -- none of fork{shell,parent,child}()
screw with them now, only their callers.


# 35975338 27-Sep-2002 christos <christos@NetBSD.org>

Put back charles' fixes from -r1.60


# edcb4544 27-Sep-2002 christos <christos@NetBSD.org>

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

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.

show more ...


# 2aa6ebd4 27-Sep-2002 mycroft <mycroft@NetBSD.org>

In evalpipe(), move the INTOFF after the waitforjob(), to prevent possible
race conditions -- now we always synchronously wait for the job to finish.
In evalcommand(), add the same INTOFF/INTON locki

In evalpipe(), move the INTOFF after the waitforjob(), to prevent possible
race conditions -- now we always synchronously wait for the job to finish.
In evalcommand(), add the same INTOFF/INTON locking as evalpipe(), to prevent
leaving internal state inconsistent, and also to insure that we synchronously
wait for the job.

show more ...


# f629aa28 15-May-2002 christos <christos@NetBSD.org>

implement noclobber. From Ben Harris, with minor tweaks from me. Two
unimplemented comments to go. Go Ben!


# 06ea4006 14-Feb-2002 christos <christos@NetBSD.org>

PR/11542: Back-out previous change that caused
set -e
for x in a; do
BAR="foo"
false && echo true
echo mumble
done

not to echo mumble...


# 33809804 04-Feb-2001 christos <christos@NetBSD.org>

remove redundant declarations and nexted externs.


# e6bccfe4 22-May-2000 elric <elric@NetBSD.org>

Back out previous vfork changes.


# f5dccf47 17-May-2000 elric <elric@NetBSD.org>

When vforking ensure that the environment passed to exec is built before
vforking as a set of local variables which can be popped by the parent.

Addresses bin/10124.


# e8b0f2b8 15-May-2000 elric <elric@NetBSD.org>

INTON and FORCEINTON modify global variables, and so should not be
executed while we are vforked.


# c55fa30b 13-May-2000 elric <elric@NetBSD.org>

Added includes for waitpid, sys/types.h and sys/wait.h.


# 756a2ca1 13-May-2000 elric <elric@NetBSD.org>

Now we use vfork(2) instead of fork(2) when we can.


# 9fcfbaea 09-Feb-2000 christos <christos@NetBSD.org>

Fix problem where commands that caused exitstatus != 0 inside loops did
not cause the shell to exit when -e was set.


# d6ac7627 27-Jan-2000 christos <christos@NetBSD.org>

Fix bin/9184, bin/9194, bin/9265, bin/9266
Exitcode and negation problems (From Martin Husemann)


# 1b23e7d1 13-Oct-1999 mrg <mrg@NetBSD.org>

back out previous; it causes /etc/rc to break on my alpha and other lossage as reported in PR#8614


# ef45922a 10-Oct-1999 pk <pk@NetBSD.org>

Backtrack `exitstatus' to make the shell really ignore the status
of `tested commands' as in this example:

set -e
true; false && echo "not reached"


12345678