summaryrefslogtreecommitdiff
path: root/Src/jobs.c
AgeCommit message (Collapse)AuthorFilesLines
2015-08-1136104: change order of child_block() and dont_queue_signals() to resolve yet ↵Barton E. Schaefer1-2/+2
another race condition
2015-08-0935929: protect FDT_PROC_SUBST by #ifdefJun-ichi Takimoto1-2/+5
2015-07-2335849: close fd's from process substitution after forkPeter Stephenson1-4/+6
Leaving these hanging in parent could cause deadlock: test added.
2015-05-0535032: Handle SIGCONT for process better.Peter Stephenson1-1/+3
Update job status as well as process status.
2015-01-0634120: compctl, jobs: Check contents instead of arrayMikael Magnusson1-1/+1
text is an array in the struct, and can never be null. Found by Coverity (Issue 1255780).
2014-12-1833992: do not attempt attachtty() for process group zero (which is possible ↵Barton E. Schaefer1-2/+5
in a linux pid namespace)
2014-12-1633982: minimal support for pid namespaces by recognizing that GETPGRP() may ↵Chirantan Ekbote1-1/+1
return 0
2014-12-1133876: etc.: Separate errors and keyboards interruptsPeter Stephenson1-8/+15
Combination of 12 commits from interrupt_abort branch. Basic strategy is to introduce bits to errflag and to set and reset them separately. Remove interrupt status on return to main keymap. Turn off ERRFLAG_INT for always block. Restore bit thereafter: we probably need a new variable in order to allow user interrupts to be reset in the always block. Add TRY_BLOCK_INTERRUPT This works the same as TRY_BLOCK_ERROR, but for a SIGINT, too. Ensure propagation of SIGINT from exited job. If received by foreground job, shell uses ERRFLAG_INT, not ERRFLAG_ERROR, to set the new state. Reset errflag before precmd() Add always block in _main_completion to fix ZLS_COLORS Ensures we get the right state of $ZLS_COLORS at the end of _main_complete even if there's an interrupt. However, the "right state" is a bit messy as it depends on styles.
2014-10-31unposted: quash compiler warningOliver Kiddle1-0/+2
2014-10-2733562: Fix thinko in previous commitMikael Magnusson1-1/+3
2014-10-2733561: The time builtin forgot to unmetafy TIMEFMTMikael Magnusson1-1/+1
2014-10-2633531 with additions: retain status of exited background jobs.Peter Stephenson1-21/+117
Add linked list of unwaited-for background jobs. Truncate at value of _SC_CHILD_MAX discarding oldest. Remove old lastpid_status mechanism for latest exited process only. Slightly tighten safety of permanently allocated linked lists so that this doesn't compromise signal handling.
2014-10-0433354: when backgrounding a pipeline, close all pipe descriptors in the parentBarton E. Schaefer1-1/+3
Add test for both this and 33345+33346
2014-08-2233042: $? and $pipestatus report 128+signal number for stopped jobsBarton E. Schaefer1-5/+10
2014-05-2932624: use correct scaling factor (clock ticks) for timesPeter Stephenson1-15/+17
2013-12-2532178: fix another acquire_pgrp() infinite loopBarton E. Schaefer1-0/+4
2013-12-2132176: plug additional deadlock-inducing pipe descriptor leaksPeter Stephenson1-13/+25
2013-10-2931929: Src/jobs.c: fix DPUTS3() test condition from 31906.Barton E. Schaefer1-1/+1
2013-10-2631906: fix race-condition interaction of $pipestatus with job controlBarton E. Schaefer1-3/+10
printjob() should not reference oldjobtab for job numbers unless it is being called from bin_fg(). printjob() also must not attempt to update pipestats when called from bin_fg(). acquire_pgrp() should not loop infintely if the shell is not interactive. Update the $pipestatus stress test so that it also exercises the oldjobtab repair.
2013-10-2431885: fix PIPEFAIL when the last command executes in the current shellBarton E. Schaefer1-18/+24
2013-10-2331879 plus misc.: improve $pipestatus handling and add a test for itBarton E. Schaefer1-17/+35
2013-10-06users:18023: Add PIPEFAIL optionPeter Stephenson1-3/+10
2013-07-1931536 with additions: Fix hang in previous process substitution fix.Peter Stephenson1-0/+25
Close applicable file descriptors when waiting for a job.
2013-07-1731528: use job table to record file descriptors associated with process substPeter Stephenson1-5/+37
2012-11-18users/17042: don't stomp the environment in "jobs -Z" unless we've firstBart Schaefer1-0/+2
copied it to new memory.
2012-10-1130724: shell code optimisd to use execsimple() doesn't have a valid thisjobPeter Stephenson1-1/+7
2012-09-2130687 with typo corrected: don't REPORTTIME if zleactivePeter Stephenson1-0/+2
2012-05-22Danek: 30485: trailing garbage after signal number not recognised in killPeter Stephenson1-3/+8
2012-04-1530410 plus one other case: avoid divide-by-zero errorsPeter Stephenson1-3/+10
in TIMEFMT interpretation
2011-08-28users/16289: don't delete temporary files on disown.Peter Stephenson1-13/+18
Document.
2011-08-1629650: Don't lose time info after a suspend+restore.Wayne Davison1-0/+2
2011-08-14unposted: fix capitalized word in the middle of a sentenceMikael Magnusson1-1/+1
2011-08-1029654: "wait" should resume stopped jobs identified by process ID as wellBart Schaefer1-6/+13
as by job number; temporary (?) workaround for pipelines getting lost if TSTP is delivered when a shell builtin is the tail of the pipe.
2011-06-1529481: always return a matching job in findproc() but scan the whole listBart Schaefer1-4/+6
to prefer running jobs
2011-06-1229472: findproc() needs at least to also return stopped jobs.Bart Schaefer1-1/+2
2011-05-1929307, 29308 + replies: Fix some doubled words in docs and comments.Mikael Magnusson1-1/+1
2011-05-0929165: use term.h globally if needed at all.Peter Stephenson1-1/+1
2011-04-01Stef van Vlierberghe: 28965 (as posted in 28967):Peter Stephenson1-1/+18
findproc() should not return processes not marked as SP_RUNNING
2010-08-2228179, users/15314, users/15310, users/15200:Peter Stephenson1-2/+57
various job and process control fixes
2010-08-1828172: mark processes as not stopped if sent SIGCONTPeter Stephenson1-4/+14
2010-07-31users/15219: PRINTEXITVALUE if terminated by signalPeter Stephenson1-0/+4
2010-07-31always print job status if non-zero status and PRINTEXITSVALUEPeter Stephenson1-12/+18
2009-12-16Check the return value of all pipe(), read(), and write() calls.Wayne Davison1-1/+1
Gets rid of all the remaining "ignoring return value" compiler warnings, and makes some read/write operations safer by ensuring that an EINTR is handled.
2009-12-0227442 plus tweak: wait returns status for $! even if exitedPeter Stephenson1-0/+20
2009-09-30Apple opensource patches suggested by Jun T. in 27300Peter Stephenson1-1/+1
2009-07-2027159: restore pre-23067 behavior of SIGINT outside a "wait", so thatBart Schaefer1-2/+2
foreground jobs that handle or ignore interrupts are not orphaned.
2009-07-1227134: Close SHTTY on exec.Peter Stephenson1-1/+3
27135: POSIX_JOBS leaves MONITOR on in subshell and doesn't save parent job table.
2009-07-1127131: allow MONITOR in subshell by not closing SHTTYPeter Stephenson1-1/+2
2009-07-1027106: reset status on command that expands to emptyPeter Stephenson1-45/+58
27122: add POSIX_JOBS option
2009-07-1027119: job output to stdout if non-interactivePeter Stephenson1-6/+5
no automated jobs notifications