Bash does not respect nohup setting

Bug #723692 reported by Kjell L.
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: bash

Option huponexist is set to be off but bash still close background jobs. I remember before Maverick and maybe Lucid that background jobs did not close even if you close the terminal. So this is a regression.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: bash 4.1-2ubuntu4
ProcVersionSignature: Ubuntu 2.6.35-25.44-generic 2.6.35.10
Uname: Linux 2.6.35-25-generic x86_64
NonfreeKernelModules: fglrx
Architecture: amd64
Date: Wed Feb 23 13:41:03 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: bash

Revision history for this message
Kjell L. (lkjell) wrote :
Revision history for this message
Phillip Susi (psusi) wrote :

This is normal behavior that has never changed. When a terminal is closed, the kernel sends SIGHUP to all attached processes. It has nothing to do with bash. The usual method of allowing a program to run in the background after closing the terminal is to run it with the nohup program.

If you can get a backgrounded job to remain running after closing the terminal ( other than by using nohup ) on lucid, could you describe how?

Changed in bash (Ubuntu):
status: New → Incomplete
Revision history for this message
Kjell L. (lkjell) wrote :

As I said that previous version you could run like firefox & and close the terminal and it still run.
The problem now is even if I disable huponexit it still close!

Revision history for this message
Phillip Susi (psusi) wrote :

Strangely, that works for me in maverick, even though it shouldn't.

Revision history for this message
Kjell L. (lkjell) wrote :

Something is wrong then

Revision history for this message
Kjell L. (lkjell) wrote :

Figured it out. When you use the command exit the jobs will remain. These upstream developers are vexing me.
It is the same thing they did with history save. Until they changed it back.

Changed in bash (Ubuntu):
status: Incomplete → New
Revision history for this message
Kjell L. (lkjell) wrote :

A temporary fix is to add <trap "disown -ah" HUP> to ~/.bashrc . Change option a to r for running jobs only.
Might want to do <trap "exit" HUP> incase these upstream developers wanted to make history save on exit only.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.