Bruce Evans
3ef22d496d
Backed out previous backout. Put y.tab.h back in SRCS.
1998-05-06 15:33:59 +00:00
Bruce Evans
e43e36af7d
Backed out previous commit. It was tested, but not for the case where
...
a separate object tree doesn't exist. Crufty makefiles will have to
put y.tab.h in SRCS so that we know not to create foo.h from foo.y.
1998-05-05 07:36:55 +00:00
Bruce Evans
b681d90662
Fixed races in `make -jN' using new yacc rules.
1998-05-04 20:09:06 +00:00
Martin Cracauer
686ed44763
When calling a shell function, remember whether exit status is tested.
...
This is needed for the '-e' option. See the PR for more details.
PR: 6047
Reviewed by: PR submitter, silence on review request.
1998-05-04 07:24:10 +00:00
Bruce Evans
cddfa6c981
Backed out most of rev.1.19 (explicit dependencies of object files
...
on generated headers). This is now handled generally in bsd.prog.mk.
1998-04-26 16:12:23 +00:00
John Polstra
6466945a67
Explicitly describe the rules the shell uses to search for a file
...
sourced by the "." command.
1998-02-12 01:23:11 +00:00
Martin Cracauer
8624242ab8
Back out my previous attempt to fix SIGINT/SIGTERM behaviour
1998-02-06 23:50:39 +00:00
Martin Cracauer
9dee16dba6
Fix handling of SIGINT/SIGQUIT for foreground subprocesses. Most
...
urgent need is when you run sh around a program that intentionally
uses SIGQUIT/SIGINT for asynchronous events, i.e. $EDITOR started from
system(2), like many mailers do. This fixes PR bin/1206 and possibly
bin/4241.
The solution committed has been tested for a large number of possible
cases (see recent discussion on cvs-committers). I completed a make
world, made sure 'make world' is interruptable and used the changed
/bin/sh as a login shell all day, including job control and using
SIGQUIT-catching programs (to write this message :-).
PR: bin/1206
Reviewed by: discussion on cvs-commiters
1998-02-06 18:14:26 +00:00
Steve Price
ee7dc4169c
Correct a bogon in an example.
...
PR: 5415
Submitted by: Sergei S. Laskavy <laskavy@pc759.cs.msu.su>
1998-01-02 19:23:05 +00:00
Alexander Langer
3344c3521c
Added $Id$.
1997-12-29 00:00:10 +00:00
Eivind Eklund
007d33500e
Remove simultaneous include of <sys/param.h> and <sys/types.h>.
...
Reorder includes to be alphabetical some places since I already was in
here.
1997-12-10 22:18:54 +00:00
John Polstra
c351e0897e
Document the exit status for a command that was terminated by a
...
signal.
1997-11-12 04:32:50 +00:00
Bruce Evans
28701136f7
Fixed some type and value mismatches. setsignal() returned a bogusly
...
cast value that was always ignored. Rev.1.9 of trap.c made this
more bogus by returning a semantically different value after calling
siginterrupt(). Avoid these problems by not returning a value.
1997-11-10 11:32:24 +00:00
Andrey A. Chernov
8dd81503df
1) Fix longstanding bug:
...
trap 'echo xxx' 1 2 3 15
read x
is not interrupted by ^C (due to restartable read syscall) and must be
interrupted per POSIX
Worse case:
read -t 5 x
hangs forever after ^C pressed (supposed to timeout after 5 secs)
Fixed by adding siginterrupt(signo, 1) after catch handler installed
2) Do not reinstall sighandler immediately after it is called,
BSD do it for us
1997-11-05 23:33:58 +00:00
Jordan K. Hubbard
97fe7f477f
Changes to support full make parallelism (-j<n>) in the world
...
target.
Reviewed by: <many different folks>
Submitted by: Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
1997-10-05 09:40:24 +00:00
Mike Smith
afa53c8df7
Add the '-t timeout' option to the 'read' builtin. This allows the
...
'read' command to return an error if the user fails to supply any
input withink a given time period. The behaviour of this option is
similar to that of the like-named option in ksh93.
Reviewed by: joerg
1997-09-29 15:15:16 +00:00
Wolfram Schneider
c7a197e1d8
PR: docs/4449
...
The -c flag is not documented in the sh(1) manapge.
Submitted by: adrian@virginia.edu
1997-09-13 17:40:00 +00:00
Bruce Evans
18f368f2e4
Restored clobbered parts of rev.1.15 (build intermediate object files
...
for tools).
1997-08-25 19:50:01 +00:00
Steve Price
ead152eb86
Make all status values an integral type and use
...
pid_t when referring to process IDs.
1997-08-18 02:53:20 +00:00
Jordan K. Hubbard
f2d0ae8518
Back out previous fix - this bug's got diplomatic immunity as a registered
...
political issue.
1997-06-19 17:57:06 +00:00
Jordan K. Hubbard
fc0eef9f89
>Number: 3780
...
>Category: bin
>Synopsis: WEXITSTATUS() may return nagative value, which causes sh to generate bad $?
PR: 3780
Submitted by: sanewo@ba2.so-net.or.jp
1997-06-19 15:14:01 +00:00
Andrey A. Chernov
ea1376dfbb
Now [^abc] means the same as [!abc] like bash and *csh already does
1997-06-06 23:04:33 +00:00
Steve Price
00fc54b03c
Make sh(1) less aware of the bit fields returned by wait by
...
using the WIF* macros in sys/wait.h.
PR: bin/3668
Submitted by: dholland@eecs.harvard.edu
1997-05-24 21:04:55 +00:00
Steve Price
9e5a9c06d0
Remove y.tab.h from the beforedepend target. Also add a
...
rule that shows the dependency of arith_lex.[co] on y.tab.h.
Suggested by: Bruce Evans <bde@zeta.org.au>
1997-05-21 03:23:23 +00:00
Steve Price
b7059dd6df
Add explicit y.tab.h rule so that 'make depend clean all' does
...
not fail with an "don't know how to make y.tab.h" error.
1997-05-19 00:29:29 +00:00
Steve Price
e7a0b0244d
Use the __unused attribute where warranted.
1997-05-19 00:18:52 +00:00
Steve Price
f7a827cc92
Miscellaneous sorting and addition of rules for object files that
...
depend on generated headers.
Reviewed by: Bruce Evans <bde@zeta.org.au>
1997-05-19 00:16:27 +00:00
Steve Price
ea76be72fe
Revise the section that explains how to protect parts of an $ENV script
...
from being executed in non-interactive mode.
Suggested and Reviewed by: Brian Somers <brian@freebsd.org>
1997-05-07 11:42:00 +00:00
Steve Price
2afa86e799
Don't source $ENV unless this is an interactive shell.
1997-05-05 03:45:17 +00:00
Steve Price
5382d20cf1
Turn on the new type builtin.
1997-04-28 03:50:07 +00:00
Steve Price
96522b887c
Sync with NetBSD's revision 1.29 of this file.
...
Obtained from: NetBSD
1997-04-28 03:28:43 +00:00
Steve Price
f4eb55ba86
Remove an extra semicolon and nuke register keyword usage.
1997-04-28 03:27:12 +00:00
Steve Price
79f569479b
Fix redirection of unopened file descriptors and nuke register
...
keyword usage.
Obtained from: NetBSD
1997-04-28 03:25:13 +00:00
Steve Price
7920a31db6
Revert changes from rev 1.16 to 1.17 for now. Closes PR 2879.
1997-04-28 03:22:09 +00:00
Steve Price
ab72124fb4
mdoc-ify and cleanup UNIMPLEMENTED messages. Closes PR 2880.
1997-04-28 03:20:09 +00:00
Steve Price
115359949d
Reorder declarations slightly.
1997-04-28 03:17:51 +00:00
Steve Price
904a3dc819
Avoid a possible NULL pointer dereference, nuke register usage,
...
and remove an unnecessary reset.
Obtained from: NetBSD
1997-04-28 03:16:12 +00:00
Steve Price
7e461ef4f3
Nuke register keyword usage, #if -> #ifdef, and avoid void *
...
arithmetic.
Obtained from: NetBSD
1997-04-28 03:14:04 +00:00
Steve Price
4ca7fe3b96
Nuke register keyword usage, rename pread to preadfd, and open
...
input files FD_CLOEXEC.
Obtained from: NetBSD
1997-04-28 03:11:52 +00:00
Steve Price
62730a71b9
When NO_HISTORY is defined and the history command is used
...
show an error message.
Inspired by: NetBSD
1997-04-28 03:10:31 +00:00
Steve Price
76ad65f7f6
Add a type builtin and nuke register keyword usage.
...
Obtained from: NetBSD
1997-04-28 03:08:38 +00:00
Steve Price
afb033d5c4
Nuke register keyword usage and #if -> #ifdef.
...
Obtained from: NetBSD
1997-04-28 03:06:52 +00:00
Steve Price
61f4ddf420
Shamelessly pilfer most of NetBSD's Makefile so that the
...
problem with 'make -j n' and no .depend file goes away.
I think Bruce mentioned this somewhere on one of the
mailing lists.
Obtained from: NetBSD
1997-04-28 03:03:23 +00:00
Warner Losh
93ef08af3e
compare return value from getopt against -1 rather than EOF, per the final
...
posix standard on the topic.
1997-03-28 15:24:41 +00:00
Peter Wemm
b97fa2ef50
Revert $FreeBSD$ to $Id$
1997-02-22 14:13:04 +00:00
Steve Price
2293cbb28a
Fix a expansion bug that caused the result of echo $((1 << 30))
...
to get truncated.
Submitted by: bde
1997-02-16 01:54:19 +00:00
Jordan K. Hubbard
1130b656e5
Make the long-awaited change from $Id$ to $FreeBSD$
...
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Steve Price
938ddab485
Fix a problem that caused some foreground pipelines to die with:
...
tcsetpgrp failed, errno=1
Discovered and Reviewed by: joerg
1997-01-06 01:26:44 +00:00
Steve Price
5e46e01939
Make sh(1) think and be in the same place at the same time. This closes
...
PR#2331: strange output of sh's pwd on symlinked directories.
1997-01-04 19:14:29 +00:00
Steve Price
f98e1b8071
With these changes sh(1)'s trap command should be POSIX-compliant,
...
while remaining (becoming :) compatible with other popular shells.
Specifically these changes include:
1) Implement 'trap -l' to get a list of valid signals names. This
is useful if you wanted to do something like reset all signal
handlers to there defaults values, in which case something like
this will do the trick.
trap `trap -l`
2) Reformat the output of 'trap' so it can be saved and later eval'd
to restore the saved settings.
3) Allow the use of signal names as well as signal numbers.
4) Fix trap handling of SIGCHLD so that commands like the following
(albeit, contrived) won't cause sh(1) to recurse ad infinitum.
trap uname 0 20
5) Make variables static that are used only in trap.c.
6) Minor 'style(9) police' mods.
1996-12-24 23:59:53 +00:00