Commit Graph

125 Commits

Author SHA1 Message Date
charnier
86bc037e71 Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
bde
196c9f6d89 Backed out previous backout. Put y.tab.h back in SRCS. 1998-05-06 15:33:59 +00:00
bde
dba406f638 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
bde
f701fbc7d5 Fixed races in `make -jN' using new yacc rules. 1998-05-04 20:09:06 +00:00
cracauer
5b12149227 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
bde
ea697874b9 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
jdp
4911b4c5bd Explicitly describe the rules the shell uses to search for a file
sourced by the "." command.
1998-02-12 01:23:11 +00:00
cracauer
cc1e6a2611 Back out my previous attempt to fix SIGINT/SIGTERM behaviour 1998-02-06 23:50:39 +00:00
cracauer
69ec138f35 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
27cda073a4 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
alex
0f42dce470 Added $Id$. 1997-12-29 00:00:10 +00:00
eivind
2208ac1acf 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
jdp
33bb94d305 Document the exit status for a command that was terminated by a
signal.
1997-11-12 04:32:50 +00:00
bde
9dbc4bc4ff 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
ache
01ee8c1bbd 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
jkh
418d0a6a92 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
msmith
c0121f12cf 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
wosch
bb524100fb 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
bde
c0ad342824 Restored clobbered parts of rev.1.15 (build intermediate object files
for tools).
1997-08-25 19:50:01 +00:00
steve
4d76e42e81 Make all status values an integral type and use
pid_t when referring to process IDs.
1997-08-18 02:53:20 +00:00
jkh
e5f80c5114 Back out previous fix - this bug's got diplomatic immunity as a registered
political issue.
1997-06-19 17:57:06 +00:00
jkh
7f875c5f66 >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
ache
837346c6cf Now [^abc] means the same as [!abc] like bash and *csh already does 1997-06-06 23:04:33 +00:00
steve
27968b9dee 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
bc7339d881 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
cc4887cc10 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
2f84314766 Use the __unused attribute where warranted. 1997-05-19 00:18:52 +00:00
steve
a5235db275 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
360ef2058c 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
ed817524a2 Don't source $ENV unless this is an interactive shell. 1997-05-05 03:45:17 +00:00
steve
c2743ee837 Turn on the new type builtin. 1997-04-28 03:50:07 +00:00
steve
9b0ffd7cdc Sync with NetBSD's revision 1.29 of this file.
Obtained from: NetBSD
1997-04-28 03:28:43 +00:00
steve
6186f8a0bf Remove an extra semicolon and nuke register keyword usage. 1997-04-28 03:27:12 +00:00
steve
1601bfa863 Fix redirection of unopened file descriptors and nuke register
keyword usage.

Obtained from: NetBSD
1997-04-28 03:25:13 +00:00
steve
bd025769ba Revert changes from rev 1.16 to 1.17 for now. Closes PR 2879. 1997-04-28 03:22:09 +00:00
steve
4636b4b5ee mdoc-ify and cleanup UNIMPLEMENTED messages. Closes PR 2880. 1997-04-28 03:20:09 +00:00
steve
f781548b1d Reorder declarations slightly. 1997-04-28 03:17:51 +00:00
steve
1da8ca45aa 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
a503bbc21f Nuke register keyword usage, #if -> #ifdef, and avoid void *
arithmetic.

Obtained from: NetBSD
1997-04-28 03:14:04 +00:00
steve
6ce1ec6c04 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
101652d621 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
d13866ebb9 Add a type builtin and nuke register keyword usage.
Obtained from: NetBSD
1997-04-28 03:08:38 +00:00
steve
2b784fa564 Nuke register keyword usage and #if -> #ifdef.
Obtained from: NetBSD
1997-04-28 03:06:52 +00:00
steve
9c7a4e1848 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
imp
054f35c222 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
83b3c2c161 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
steve
45d17b0093 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
jkh
808a36ef65 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
774419801b 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
5936b56fef 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