Comment 2 for bug 1782443

Revision history for this message
Paulo Marcel Coelho Aragão (marcelpaulo) wrote :

Digging into this problem, I learned that:

nohup program &

doesn't stop the shell from sending SIGHUP to program when the shell ends. The job has to be removed from the job table, running:

disown

So, to properly prevent a background program from receiving SIGHUP, the correct sequence should be:

program &
disown

This led me to think /etc/urlview/system.urlview was the problem, so just for testing, I copied it to ~/.urlview, and changed it to:

#
# Sample urlview(1) configuration file
#

# regular expression to use to match URLs
REGEXP (((http|https|ftp|gopher)|mailto):(//)?[^ <>"\t]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;\t\n\r<">\):]?[^, <>"\t]*[^ .,;\t\n\r<">\):]

# command to invoke for selected URL
COMMAND /tmp/foo

# set to yes to enable menu wrapping
#WRAP Yes

and created /tmp/foo:

#!/bin/bash
sensible-browser "$1" &
disown

But this bug was reproduced just the same. So, it looks like urlview itself is running COMMAND through the shell, and it should group COMMAND and disown and run them together in a single shell invocation.