History log of /netbsd-src/bin/sh/trap.c (Results 26 – 50 of 58)
Revision Date Author Comments
# e996b462 15-Jul-2005 christos <christos@NetBSD.org>

Allow trap to work on ignored signals when the shell is interactive.


# 3564ac65 11-Jul-2005 christos <christos@NetBSD.org>

Don't hard ignore signals that were ignored by our environment, because
when we try to set a trap on them it will not work. Also while I am here:
1. don't change the action status if the signal syste

Don't hard ignore signals that were ignored by our environment, because
when we try to set a trap on them it will not work. Also while I am here:
1. don't change the action status if the signal system call failed.
2. don't try to sigignore it if signal failed.
3. clear the signal mask in case our parent blocked it for us.

show more ...


# 2a32d39e 11-Jan-2005 christos <christos@NetBSD.org>

PR/28940: David Laight: /bin/sh doesn't quote the output of trap.


# 6d820075 26-Aug-2003 jmmv <jmmv@NetBSD.org>

Use '\0' instead of NULL in two checks (we are not checking for a pointer
value). While here, add a missing whitespace.


# b5b29542 07-Aug-2003 agc <agc@NetBSD.org>

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


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


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


# 8d23cb03 18-Mar-2001 wulf <wulf@NetBSD.org>

Extended functionality of the trap builtin, which now closely follows
POSIX recommendations.

- trap now accepts signal names and signal numbers
e.g. INT, SIGINT, 2
- added option -l that output

Extended functionality of the trap builtin, which now closely follows
POSIX recommendations.

- trap now accepts signal names and signal numbers
e.g. INT, SIGINT, 2
- added option -l that outputs a list of valid signals
- added signal EXIT to list of valid signals
- a `-' in the action part will reset specified signal to their
default behaviour
- changed standard output format to make it suitable as an input
to another shell that achieves the same trapping results

show more ...


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


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

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


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

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


# 832949b9 27-Mar-1999 christos <christos@NetBSD.org>

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


# 1666f88d 05-Feb-1999 christos <christos@NetBSD.org>

Fix the -c problem differently. We cannot just ignore SIGINT etc, otherwise
we cannot interrupt sh -c <command>


# e1849b79 18-Jan-1999 christos <christos@NetBSD.org>

PR/6213: Urban Boquist: /bin/sh does not handle a trapped signal correctly
The problem was that system calls got restarted after a signal,
instead of returning EINTR. Thus the read builtin, had n

PR/6213: Urban Boquist: /bin/sh does not handle a trapped signal correctly
The problem was that system calls got restarted after a signal,
instead of returning EINTR. Thus the read builtin, had no way to
know that a signal occured that could change the course of execution.
Since the code has sprinkled checks for EINTR all over the place,
it is supposed to work properly with non restartable syscalls.
The fix is to use siginterrupt(signo, 1), before setting a signal
handler, to make sure that system calls don't get restarted.

show more ...


# 9dc385be 28-Jul-1998 mycroft <mycroft@NetBSD.org>

Delint.


# cd799663 04-Jul-1997 christos <christos@NetBSD.org>

Fix compiler warnings.


# bc73cf95 16-Oct-1996 christos <christos@NetBSD.org>

PR/2808: Remove trailing whitespace (from FreeBSD)


# 9d255ec4 07-Jun-1995 christos <christos@NetBSD.org>

Ignore result of sigaction when setting traps. Traps will succeed even
on SIGKILL or SIGSTOP. This is what other bourne shells do. (suggested
by mycroft)


# b842cc27 05-Jun-1995 christos <christos@NetBSD.org>

Avoid trapping SIGKILL. Pretend that we did, so that we will not keep
failing trying to trap it later. This is what the other bourne shells do.


# 07bae7ed 11-May-1995 christos <christos@NetBSD.org>

Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
bug.


# 49f0ad86 21-Mar-1995 cgd <cgd@NetBSD.org>

convert to new RCS id conventions.


# 58f17331 23-Dec-1994 cgd <cgd@NetBSD.org>

be more careful with casts.


# 4ce0d34a 05-Dec-1994 cgd <cgd@NetBSD.org>

clean up further. more patches from Jim Jegers


# cafd1f7e 11-Jun-1994 mycroft <mycroft@NetBSD.org>

Add RCS ids.


123