Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ommitted time on resume



Another potential fix would be to change the hiding choices of the jobs so that the "jobs" output would show the pieces of the pipeline, more like when a non-time-using pipeline is used.  For example, if I suspend "sleep 5 | cat ~/foo/*(^/) | wc", jobs shows me the various pieces of the pipeline (as would continue):

[1]  + suspended  sleep 5 | 
       done       cat ~/foo/*(^/) | wc

I created the attached simple patch to test this, but it doesn't really work right -- it doesn't hide the super job (which might be a good thing), and it prints superfluous "done" messages at the end of the run.  I'm not going to fiddle with this anymore, since my prior patch seems like a reasonable fix, and the changing of the jobs output when suspending a newly-created super-job seems like a separate issue (but one that could also fix the time issue in a different way).

..wayne..
index 6320f6a..7170652 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1549,8 +1549,8 @@ execpline(Estate state, wordcode slcode, int how, int last1)
 			 * normal (non-super-) job. */
 			if (!(jn->stat & STAT_DONE)) {
 			    jobtab[list_pipe_job].other = newjob;
-			    jobtab[list_pipe_job].stat |= STAT_SUPERJOB;
-			    jn->stat |= STAT_SUBJOB | STAT_NOPRINT;
+			    jobtab[list_pipe_job].stat |= STAT_SUPERJOB | STAT_NOPRINT;
+			    jn->stat |= STAT_SUBJOB;
 			    jn->other = pid;
 			}
 			if ((list_pipe || last1) && hasprocs(list_pipe_job))


Messages sorted by: Reverse Date, Date, Thread, Author