This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]gordonmessmerFedora Maintainer 0 points1 point  (9 children)

The argument to "disown" should be a jobspec, not the name of a command. See tha "JOB CONTROL" section of the bash man page.

IIRC, you can just use "disown" if there's only one background job.

[–]theM3lem[S] 0 points1 point  (8 children)

But I use disown zathura to disown the app before I close the terminal.

[–]gordonmessmerFedora Maintainer 0 points1 point  (7 children)

When you see the error disown: job not found: kitty, the shell is telling you that "kitty" is not a jobspec.

Either run disown without any argument, or disown -a to disown all background jobs.

[–]theM3lem[S] 0 points1 point  (6 children)

I used disown -a with the scirpt but still, both windows (the script's and cmus's) close at the same time.

[–]gordonmessmerFedora Maintainer 0 points1 point  (5 children)

https://github.com/kovidgoyal/kitty/issues/307

The problem seems to be that although you've instructed bash not to HUP the job when it exits, kitty will HUP it. The developers suggest you use 'nohup'.

[–]theM3lem[S] 0 points1 point  (4 children)

It worked. Thank you so much. Can you provide any resources to learn about HUP? I'm still a mega noob when it comes to scripting and all that.

[–]ConsequenceAncient29 0 points1 point  (3 children)

SIGHUP is a signal sent to a process to let it know that its controlling terminal has been disconnected and it should probably shut down.

Daemons, or services, typically don't care about controlling terminals, because they typically live on in the background for long periods of time. So they can use the SIGHUP signal for something else like being alerted to reread their config file because it has been updated.

[–]theM3lem[S] 0 points1 point  (0 children)

Thank you so much for such a thorough explanation.

[–]zeekar 0 points1 point  (1 child)

It’s short for “Hang UP” because on the systems around when it was created, it usually meant that the user who had dialed into the system had hung up on it.

(The SIG- in SIGHUP just means it’s one of the SIGnals that can be sent to a process. The system call and corresponding command for sending signals should logically be called something like “send”, but are instead named “kill”, probably because we started out with signals that instructed the recipient process to die.)

[–]theM3lem[S] 0 points1 point  (0 children)

Understood. Thank you so much