Zsh Mailing List Archive
Messages sorted by:
Re: Background task gets killed while closing zsh. Why?
- X-seq: zsh-users 9658
- From: Jean Chalard <jean.chalard@xxxxxxxxx>
- To: Sebastian Stein <seb_stein@xxxxxx>
- Subject: Re: Background task gets killed while closing zsh. Why?
- Date: Mon, 7 Nov 2005 18:32:06 +0900
- Cc: zsh-users@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bDJUNEzJBGTamPxOv4F13+ohY47Rj/XtSpHXwXF1l6LRPUuHKhfRJKZ3at38z+ROZGfeoNM9tAJDKD1JCJbF2FTj4QTRszaHLVVnoYczgOvXJluoSl0mei+l6b3WZanSHjO54ef59opm3cZ9RrfY1IZOCKk4Kap9yxY35CPv27M=
- In-reply-to: <20051107091847.GC2774@xxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20051107091847.GC2774@xxxxxxxx>
> I have defined a suffix alias for pdfs:
> alias -s pdf='acroread'
> Now I call a pdf:
> test.pdf &
> As far as I understand this is expanded to:
> acroread test.pdf &
> Now acroread gets called and shows the pdf. Now I logout of my zsh, but in
> this case also acroread gets closed. When I was using bash as my shell, I
> was able to call something as a background job from bash and close bash
> without closing the job. What am I doing wrong with zsh here?
This is zsh's default behaviour. It ensures that you have no dangling
processes that you are not aware of.
If you want zsh not to SIGHUP the running children when the shell
exits, you have as far as I know four possibilities :
- Run your command with the no_hup command prefixed.
- Use &! or &| instead of &.
- Use disown on the job number while it's running.
- Change the value of the hup option with something like 'setopt
no_hup'. This will stop the shell from sending HUP to the running
children on exit in a (default) bash-like manner. If you choose this
solution, you may want to also disable the check_jobs option to stop
the shell from warning you there are running jobs, and of course put
that into your startup files.
I personnally hate the bash-like behaviour because I find I lack
control over the sessions and use the 2nd and 3rd possibilities I
listed here, but the choice is yours.
"Toi, je te trouve pas la même tête que sur la page précédente" -- Wakamiya
Messages sorted by: