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

Re: background job status update



On Mar 14,  9:18pm, Atom Smasher wrote:
} Subject: background job status update
}
} if i start a job in the background such as:
}  	sleep 30 &
}   i get a status report sent to stderr as expected:
}  	[1] 1234
}   but when the job exits, i get this to my terminal:
}  	[1]  + done       sleep 30
} 
} i would expect both of those messages to be sent to stderr.

Funny, I'd expect both to be sent to the terminal.

The problem is that spawnjob() doesn't go through printjob() to format
the output of "[1] 1234" (silly aside: as I was testing this, process
IDs on my machine passed through "12345") and instead simply writes
directly to stderr.  I think at the very least it should be using the
special shout (shell output) file pointer, which is what printjob()
does during all job control operations thereafter.

I'm not sure why it doesn't just use printjob(); probably historic from
when both of those functions were simpler.

} why is the 
} second message sent to my terminal? how can i direct it to stderr?

You can't.

All you can do is suppress it by unsetopt monitor or by starting the
background job in a subshell, or delay it by unsetopt notify.



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