1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-26 14:00:50 +02:00
Commit Graph

110 Commits

Author SHA1 Message Date
Peter Stephenson
d067ebcacd 33876: etc.: Separate errors and keyboards interrupts
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-12-11 09:41:17 +00:00
Oliver Kiddle
6a29f66f8a unposted: quash compiler warning 2014-10-31 18:00:05 +01:00
Mikael Magnusson
ed90154e58 33562: Fix thinko in previous commit 2014-10-27 20:54:20 +01:00
Mikael Magnusson
ded97b8ed9 33561: The time builtin forgot to unmetafy TIMEFMT 2014-10-27 20:46:48 +01:00
Peter Stephenson
b4f7ccecd9 33531 with additions: retain status of exited background jobs.
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-26 17:47:42 +00:00
Barton E. Schaefer
a65fb0677c 33354: when backgrounding a pipeline, close all pipe descriptors in the parent
Add test for both this and 33345+33346
2014-10-04 21:08:56 -07:00
Barton E. Schaefer
cb468501c9 33042: $? and $pipestatus report 128+signal number for stopped jobs 2014-08-22 09:12:23 -07:00
Peter Stephenson
880020ca2e 32624: use correct scaling factor (clock ticks) for times 2014-05-29 21:40:33 +01:00
Barton E. Schaefer
15f4843c67 32178: fix another acquire_pgrp() infinite loop 2013-12-25 16:20:49 -08:00
Peter Stephenson
aede5c52bf 32176: plug additional deadlock-inducing pipe descriptor leaks 2013-12-21 17:41:21 -08:00
Barton E. Schaefer
ed01d6e1e8 31929: Src/jobs.c: fix DPUTS3() test condition from 31906. 2013-10-29 09:28:20 -07:00
Barton E. Schaefer
c3114a7735 31906: fix race-condition interaction of $pipestatus with job control
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-26 16:11:40 -07:00
Barton E. Schaefer
5b30149638 31885: fix PIPEFAIL when the last command executes in the current shell 2013-10-24 17:31:13 -07:00
Barton E. Schaefer
65e131c838 31879 plus misc.: improve $pipestatus handling and add a test for it 2013-10-23 22:45:02 -07:00
Peter Stephenson
5236425865 users:18023: Add PIPEFAIL option 2013-10-06 21:35:27 +01:00
Peter Stephenson
cda21a28e6 31536 with additions: Fix hang in previous process substitution fix.
Close applicable file descriptors when waiting for a job.
2013-07-19 12:09:32 +01:00
Peter Stephenson
3c5732223f 31528: use job table to record file descriptors associated with process subst 2013-07-17 21:33:16 +01:00
Bart Schaefer
daa9e1fd54 users/17042: don't stomp the environment in "jobs -Z" unless we've first
copied it to new memory.
2012-11-18 18:27:18 +00:00
Peter Stephenson
ad92cb3203 30724: shell code optimisd to use execsimple() doesn't have a valid thisjob 2012-10-11 16:36:14 +00:00
Peter Stephenson
8e43f7f3c8 30687 with typo corrected: don't REPORTTIME if zleactive 2012-09-21 12:45:12 +00:00
Peter Stephenson
d64e62ef11 Danek: 30485: trailing garbage after signal number not recognised in kill 2012-05-22 08:57:22 +00:00
Peter Stephenson
b8d7e068fc 30410 plus one other case: avoid divide-by-zero errors
in TIMEFMT interpretation
2012-04-15 13:46:35 +00:00
Peter Stephenson
ca7269e82d users/16289: don't delete temporary files on disown.
Document.
2011-08-28 16:38:28 +00:00
Wayne Davison
2c9b4e769f 29650: Don't lose time info after a suspend+restore. 2011-08-16 15:27:05 +00:00
Mikael Magnusson
8af2cbd1f2 unposted: fix capitalized word in the middle of a sentence 2011-08-14 14:21:27 +00:00
Bart Schaefer
92ee9324a9 29654: "wait" should resume stopped jobs identified by process ID as well
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-08-10 03:21:15 +00:00
Bart Schaefer
98b29d02ca 29481: always return a matching job in findproc() but scan the whole list
to prefer running jobs
2011-06-15 15:38:14 +00:00
Bart Schaefer
21c39600ef 29472: findproc() needs at least to also return stopped jobs. 2011-06-12 15:06:37 +00:00
Mikael Magnusson
72cb7cfc6f 29307, 29308 + replies: Fix some doubled words in docs and comments. 2011-05-19 16:10:46 +00:00
Peter Stephenson
d89361739a 29165: use term.h globally if needed at all. 2011-05-09 09:49:08 +00:00
Peter Stephenson
47d1215cb4 Stef van Vlierberghe: 28965 (as posted in 28967):
findproc() should not return processes not marked as SP_RUNNING
2011-04-01 11:02:15 +00:00
Peter Stephenson
c7ff1b79dd 28179, users/15314, users/15310, users/15200:
various job and process control fixes
2010-08-22 20:08:57 +00:00
Peter Stephenson
ef9b4ad79e 28172: mark processes as not stopped if sent SIGCONT 2010-08-18 21:21:17 +00:00
Peter Stephenson
fc7ad5cc1c users/15219: PRINTEXITVALUE if terminated by signal 2010-07-31 22:03:41 +00:00
Peter Stephenson
5659426c2a always print job status if non-zero status and PRINTEXITSVALUE 2010-07-31 21:06:10 +00:00
Wayne Davison
693fd5b56e Check the return value of all pipe(), read(), and write() calls.
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-16 18:39:06 +00:00
Peter Stephenson
3206b8a2ea 27442 plus tweak: wait returns status for $! even if exited 2009-12-02 09:46:12 +00:00
Peter Stephenson
500431077b Apple opensource patches suggested by Jun T. in 27300 2009-09-30 20:32:18 +00:00
Bart Schaefer
bda90c969f 27159: restore pre-23067 behavior of SIGINT outside a "wait", so that
foreground jobs that handle or ignore interrupts are not orphaned.
2009-07-20 04:38:56 +00:00
Peter Stephenson
3257f6b8d5 27134: Close SHTTY on exec.
27135: POSIX_JOBS leaves MONITOR on in subshell and doesn't save
parent job table.
2009-07-12 15:09:56 +00:00
Peter Stephenson
653d6a0dd9 27131: allow MONITOR in subshell by not closing SHTTY 2009-07-11 19:06:51 +00:00
Peter Stephenson
73be7ee553 27106: reset status on command that expands to empty
27122: add POSIX_JOBS option
2009-07-10 11:08:39 +00:00
Peter Stephenson
bd2ee44b78 27119: job output to stdout if non-interactive
no automated jobs notifications
2009-07-10 09:10:59 +00:00
Peter Stephenson
5df700fb5b 27112: allow jobbing output if not interactive 2009-07-09 20:33:56 +00:00
Bart Schaefer
14e7096982 users/13937, users/13939: configure.ac, Src/jobs.c: check for
and if available use setproctitle() for "jobs -Z".
2009-03-16 05:20:36 +00:00
Peter Stephenson
f0bcd0ecd0 users/13910: spawnjob() should output to tty 2009-03-14 20:30:09 +00:00
Peter Stephenson
0c9830d23c 25345, 25347: neaten interface from main shell to zle 2008-07-31 08:44:16 +00:00
Peter Stephenson
a9ad660bd3 users/12812: fix hang with confusion over process numbers 2008-05-02 22:48:58 +00:00
Peter Stephenson
845faf5586 22281: wait shouldn't return immediately on signal unless trapped 2008-03-25 18:17:07 +00:00
Peter Stephenson
1ee6295909 24279: allow terminal changes after zle -I to be acquired by main shell 2007-12-18 10:42:36 +00:00