summaryrefslogtreecommitdiffstats
path: root/bin/sh/jobs.c
Commit message (Collapse)AuthorAgeFilesLines
* If traps are set, they are now executed even when a signal-blockingcracauer1998-09-081-4/+7
| | | | | | | | | | | | foreground child is running. Formerly, traps were exceuted after the next child exit. The enables the user to put a breaking wrapper around a blocking application: (trap 'echo trap ; exit 1' 2; ./pestyblocker; echo -n) The "echo -n" after the child call is needed to prevent sh from optimizing the trap-executing shell away. I'm working on this.
* Improve bookkeeping of in_waitcmd and style fixes.cracauer1998-08-251-8/+13
| | | | Submitted by: Bruce Evans
* Do not exit on SIGINT in non-interactive shells, fixes PR 1206,cracauer1998-08-241-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add rcsid. Spelling.charnier1998-05-181-3/+5
|
* 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
* 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.
* Make all status values an integral type and usesteve1997-08-181-3/+4
| | | | pid_t when referring to process IDs.
* 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
* Use the __unused attribute where warranted.steve1997-05-191-6/+6
|
* Nuke register keyword usage and #if -> #ifdef.steve1997-04-281-9/+9
| | | | Obtained from: NetBSD
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Fix a problem that caused some foreground pipelines to die with:steve1997-01-061-3/+2
| | | | | | tcsetpgrp failed, errno=1 Discovered and Reviewed by: joerg
* Merge in NetBSD mods and -Wall cleaning.steve1996-12-141-19/+49
| | | | Obtained from: NetBSD, me
* Benign | --> || correction.steve1996-10-161-2/+2
|
* Fix for PR#1287. This makes sh behave sensibly in case statements in thepeter1996-09-031-1/+2
| | | | | | | | | | | | | | face of aliases. Note, bash doesn't do aliases while running scripts, but "real" ksh does.. Also: Reduce redundant .Nm macros in (unused) bltin/echo.1 nuke error2, it's hardly used. More -Wall cleanups dont do certain history operations if NO_HISTORY defined handle quad_t's from resource limits Submitted by: Steve Price <sprice@hiwaay.net> (minor tweaks by me)
* Misc cleanups and fixes from Bruce:peter1996-09-031-3/+3
| | | | | | | | | | - don't put \n on error() calls, error adds it already. - don't prepend "ulimit" on error() calls in miscbltin.c. - getopt typo on ulimit -p -> -u conversion - get/setrlimit() calls were not being error checked ulimit formatting cleanup from me, use same wording as bash on Bruce's suggestion. Add ulimit arg to output on Joerg's suggestion.
* Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is apeter1996-09-011-55/+86
| | | | | | | | | | | | | | merge of parallel duplicate work by Steve Price and myself. :-] There are some changes to the build that are my fault... mkinit.c was trying (poorly) to duplicate some of the work that make(1) is designed to do. The Makefile hackery is my fault too, the depend list was incomplete because of some explicit OBJS+= entries, so mkdep wasn't picking up their source file #includes. This closes a pile of /bin/sh PR's, but not all of them.. Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter
* Fix relocation of job table.bde1995-09-211-1/+8
| | | | | | while { sleep 1 & wait; } do echo 1; done corrupted the job table every 4th iteration.
* Remove trailing whitespace.rgrimes1995-05-301-2/+2
| | | | Reviewed by: phk
* Added $Id$dg1994-09-241-0/+2
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+1046
OpenPOWER on IntegriCloud