summaryrefslogtreecommitdiffstats
path: root/bin/sh
Commit message (Collapse)AuthorAgeFilesLines
* Improve bookkeeping of in_waitcmd and style fixes.cracauer1998-08-257-27/+41
| | | | Submitted by: Bruce Evans
* Re-enable killing childs with SIGQUIT. Spotted by Bruce Evans.cracauer1998-08-251-2/+2
|
* Got two volatile sig_atomic_t and int mixed up. Spotted by Gary Palmer.cracauer1998-08-242-4/+4
|
* Do not exit on SIGINT in non-interactive shells, fixes PR 1206,cracauer1998-08-249-45/+92
| | | | | | | | | | | | | | | | | | | | | | | | | i.e. this makes emacs usable from system(3). Programs called from shellscripts are now required to exit with proper signal status. That means, they have to kill themself. Exiting with faked numerical exit code is not sufficient. Exit with proper signal status if script exits on signal. Make the wait builtin interruptable, both with and without traps set. Use volatile sig_atomic_t where (and only where) appropriate. (Almost) fix printing of newlines on SIGINT. Make traps setable from trap handlers. This is needed for shellscripts that catch SIGINT for cleanup work but intend to exit on it, hance have to kill themself from a trap handler. I.e. mkdep. While I'm at it, make it -Wall clean. -Wall is not enabled in Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c are not -Wall-able. PR: 1206 Obtained from: Basic SIGINT fix from Bruce Evans
* Document behaviour of "-" and "--" on the command line.jkoshy1998-07-301-2/+7
| | | | PR: docs/5399
* Added a `build-tools' target for internal tools.bde1998-07-071-4/+3
| | | | | | Removed explicit dependencies of foo.o on foo.c. These were mainly placeholders for comments about missing dependencies of tools objects on headers. This problem needs to be handled more generally.
* Add rcsid. Spelling.charnier1998-05-1827-79/+127
|
* Backed out previous backout. Put y.tab.h back in SRCS.bde1998-05-061-10/+6
|
* Backed out previous commit. It was tested, but not for the case wherebde1998-05-051-4/+8
| | | | | 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.
* Fixed races in `make -jN' using new yacc rules.bde1998-05-041-8/+4
|
* When calling a shell function, remember whether exit status is tested.cracauer1998-05-041-2/+5
| | | | | | This is needed for the '-e' option. See the PR for more details. PR: 6047 Reviewed by: PR submitter, silence on review request.
* Backed out most of rev.1.19 (explicit dependencies of object filesbde1998-04-261-19/+1
| | | | on generated headers). This is now handled generally in bsd.prog.mk.
* Explicitly describe the rules the shell uses to search for a filejdp1998-02-121-1/+10
| | | | sourced by the "." command.
* Back out my previous attempt to fix SIGINT/SIGTERM behaviourcracauer1998-02-061-16/+0
|
* Fix handling of SIGINT/SIGQUIT for foreground subprocesses. Mostcracauer1998-02-061-1/+17
| | | | | | | | | | | | | | | | 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
* Correct a bogon in an example.steve1998-01-021-2/+2
| | | | | PR: 5415 Submitted by: Sergei S. Laskavy <laskavy@pc759.cs.msu.su>
* Added $Id$.alex1997-12-291-0/+2
|
* Remove simultaneous include of <sys/param.h> and <sys/types.h>.eivind1997-12-101-2/+1
| | | | | Reorder includes to be alphabetical some places since I already was in here.
* Document the exit status for a command that was terminated by ajdp1997-11-121-1/+5
| | | | signal.
* Fixed some type and value mismatches. setsignal() returned a boguslybde1997-11-102-12/+11
| | | | | | 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.
* 1) Fix longstanding bug:ache1997-11-051-3/+10
| | | | | | | | | | | | | | 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
* Changes to support full make parallelism (-j<n>) in the worldjkh1997-10-051-6/+9
| | | | | | target. Reviewed by: <many different folks> Submitted by: Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
* Add the '-t timeout' option to the 'read' builtin. This allows themsmith1997-09-292-6/+72
| | | | | | | | '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
* PR: docs/4449wosch1997-09-131-1/+6
| | | | | | The -c flag is not documented in the sh(1) manapge. Submitted by: adrian@virginia.edu
* Restored clobbered parts of rev.1.15 (build intermediate object filesbde1997-08-251-2/+14
| | | | for tools).
* Make all status values an integral type and usesteve1997-08-182-7/+8
| | | | pid_t when referring to process IDs.
* Back out previous fix - this bug's got diplomatic immunity as a registeredjkh1997-06-191-3/+1
| | | | political issue.
* >Number: 3780jkh1997-06-191-1/+3
| | | | | | | | >Category: bin >Synopsis: WEXITSTATUS() may return nagative value, which causes sh to generate bad $? PR: 3780 Submitted by: sanewo@ba2.so-net.or.jp
* Now [^abc] means the same as [!abc] like bash and *csh already doesache1997-06-061-4/+4
|
* Make sh(1) less aware of the bit fields returned by wait bysteve1997-05-241-33/+42
| | | | | | | using the WIF* macros in sys/wait.h. PR: bin/3668 Submitted by: dholland@eecs.harvard.edu
* Remove y.tab.h from the beforedepend target. Also add asteve1997-05-211-2/+3
| | | | | | rule that shows the dependency of arith_lex.[co] on y.tab.h. Suggested by: Bruce Evans <bde@zeta.org.au>
* Add explicit y.tab.h rule so that 'make depend clean all' doessteve1997-05-191-2/+4
| | | | not fail with an "don't know how to make y.tab.h" error.
* Use the __unused attribute where warranted.steve1997-05-1911-47/+47
|
* Miscellaneous sorting and addition of rules for object files thatsteve1997-05-191-11/+25
| | | | | | depend on generated headers. Reviewed by: Bruce Evans <bde@zeta.org.au>
* Revise the section that explains how to protect parts of an $ENV scriptsteve1997-05-071-20/+12
| | | | | | from being executed in non-interactive mode. Suggested and Reviewed by: Brian Somers <brian@freebsd.org>
* Don't source $ENV unless this is an interactive shell.steve1997-05-051-2/+2
|
* Turn on the new type builtin.steve1997-04-281-1/+2
|
* Sync with NetBSD's revision 1.29 of this file.steve1997-04-281-27/+55
| | | | Obtained from: NetBSD
* Remove an extra semicolon and nuke register keyword usage.steve1997-04-281-7/+7
|
* Fix redirection of unopened file descriptors and nuke registersteve1997-04-281-9/+27
| | | | | | keyword usage. Obtained from: NetBSD
* Revert changes from rev 1.16 to 1.17 for now. Closes PR 2879.steve1997-04-281-49/+29
|
* mdoc-ify and cleanup UNIMPLEMENTED messages. Closes PR 2880.steve1997-04-281-735/+587
|
* Reorder declarations slightly.steve1997-04-281-3/+3
|
* Avoid a possible NULL pointer dereference, nuke register usage,steve1997-04-281-6/+5
| | | | | | and remove an unnecessary reset. Obtained from: NetBSD
* Nuke register keyword usage, #if -> #ifdef, and avoid void *steve1997-04-282-13/+13
| | | | | | arithmetic. Obtained from: NetBSD
* Nuke register keyword usage, rename pread to preadfd, and opensteve1997-04-281-7/+9
| | | | | | input files FD_CLOEXEC. Obtained from: NetBSD
* When NO_HISTORY is defined and the history command is usedsteve1997-04-281-3/+16
| | | | | | show an error message. Inspired by: NetBSD
* Add a type builtin and nuke register keyword usage.steve1997-04-282-5/+81
| | | | Obtained from: NetBSD
* Nuke register keyword usage and #if -> #ifdef.steve1997-04-2814-65/+65
| | | | Obtained from: NetBSD
* Shamelessly pilfer most of NetBSD's Makefile so that thesteve1997-04-281-28/+16
| | | | | | | | 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
OpenPOWER on IntegriCloud