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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1782443

Title:
  If urlview loads the browser for the first time, it kills it on ctrl-c
  or on quitting neomutt

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/urlview/+bug/1782443/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to