Does an interactive bash process implicitly send any signal other than SIGHUP to its job?
Does an interactive bash process implicitly send any signal other than SIGHUP to its job? By implicitly, I mean not as a consequence of a user's request to send a signal to a job.
It helps to answer Does `disown` apply only to SIGHUP or some or all the signals?
bash signals job-control
add a comment |
Does an interactive bash process implicitly send any signal other than SIGHUP to its job? By implicitly, I mean not as a consequence of a user's request to send a signal to a job.
It helps to answer Does `disown` apply only to SIGHUP or some or all the signals?
bash signals job-control
the source code of bash does. e.g. interactive bash's SIGHUP handler does, huponexited and interactive bash's pre-termination cleanup does.
– Tim
Jan 4 at 13:18
to bash user, what bash does is implicit. to bash, what the kernel does is implicit. I meant the former.
– Tim
Jan 4 at 13:20
add a comment |
Does an interactive bash process implicitly send any signal other than SIGHUP to its job? By implicitly, I mean not as a consequence of a user's request to send a signal to a job.
It helps to answer Does `disown` apply only to SIGHUP or some or all the signals?
bash signals job-control
Does an interactive bash process implicitly send any signal other than SIGHUP to its job? By implicitly, I mean not as a consequence of a user's request to send a signal to a job.
It helps to answer Does `disown` apply only to SIGHUP or some or all the signals?
bash signals job-control
bash signals job-control
edited Jan 4 at 13:43
Stephen Kitt
166k24368449
166k24368449
asked Jan 4 at 13:15
TimTim
26.3k75247457
26.3k75247457
the source code of bash does. e.g. interactive bash's SIGHUP handler does, huponexited and interactive bash's pre-termination cleanup does.
– Tim
Jan 4 at 13:18
to bash user, what bash does is implicit. to bash, what the kernel does is implicit. I meant the former.
– Tim
Jan 4 at 13:20
add a comment |
the source code of bash does. e.g. interactive bash's SIGHUP handler does, huponexited and interactive bash's pre-termination cleanup does.
– Tim
Jan 4 at 13:18
to bash user, what bash does is implicit. to bash, what the kernel does is implicit. I meant the former.
– Tim
Jan 4 at 13:20
the source code of bash does. e.g. interactive bash's SIGHUP handler does, huponexited and interactive bash's pre-termination cleanup does.
– Tim
Jan 4 at 13:18
the source code of bash does. e.g. interactive bash's SIGHUP handler does, huponexited and interactive bash's pre-termination cleanup does.
– Tim
Jan 4 at 13:18
to bash user, what bash does is implicit. to bash, what the kernel does is implicit. I meant the former.
– Tim
Jan 4 at 13:20
to bash user, what bash does is implicit. to bash, what the kernel does is implicit. I meant the former.
– Tim
Jan 4 at 13:20
add a comment |
2 Answers
2
active
oldest
votes
Yes, there are a number of instances which can be found by searching calls to kill
and killpg
in jobs.c
in the Bash source code.
One example is the handling of stopped jobs when exec
is run, or when the shell exits: the shell sends SIGTERM
and SIGCONT
to all stopped jobs.
Thanks. (1) are such cases rare? (2) I don't know how to search for kill in the online hosted repository, even though you might have mentioned it before a little.
– Tim
Jan 4 at 13:35
(1) As rare, or otherwise, as sendingSIGHUP
. (2) Ctrl+F in your browser works wonders when searching in a single file ;-).
– Stephen Kitt
Jan 4 at 13:42
Does disown make interactive bash not send signals other than SIGHUP to a job?
– Tim
Jan 4 at 13:50
That question is nonsensical. What doesdisown
do? How does Bash know which processes are jobs it is supposed to manage?
– Stephen Kitt
Jan 4 at 14:07
Does this make sense? Does disown apply to SIGHUP only or also to some other signal(s)?
– Tim
Jan 4 at 14:19
|
show 10 more comments
In addition to what Stephen said,
it looks like bash sends SIGCONT to stopped processes
when you issue a fg
or bg
command, or otherwise resume a stopped job.
And it sends a SIGSTOP to itself when you issue a suspend
command.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492471%2fdoes-an-interactive-bash-process-implicitly-send-any-signal-other-than-sighup-to%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes, there are a number of instances which can be found by searching calls to kill
and killpg
in jobs.c
in the Bash source code.
One example is the handling of stopped jobs when exec
is run, or when the shell exits: the shell sends SIGTERM
and SIGCONT
to all stopped jobs.
Thanks. (1) are such cases rare? (2) I don't know how to search for kill in the online hosted repository, even though you might have mentioned it before a little.
– Tim
Jan 4 at 13:35
(1) As rare, or otherwise, as sendingSIGHUP
. (2) Ctrl+F in your browser works wonders when searching in a single file ;-).
– Stephen Kitt
Jan 4 at 13:42
Does disown make interactive bash not send signals other than SIGHUP to a job?
– Tim
Jan 4 at 13:50
That question is nonsensical. What doesdisown
do? How does Bash know which processes are jobs it is supposed to manage?
– Stephen Kitt
Jan 4 at 14:07
Does this make sense? Does disown apply to SIGHUP only or also to some other signal(s)?
– Tim
Jan 4 at 14:19
|
show 10 more comments
Yes, there are a number of instances which can be found by searching calls to kill
and killpg
in jobs.c
in the Bash source code.
One example is the handling of stopped jobs when exec
is run, or when the shell exits: the shell sends SIGTERM
and SIGCONT
to all stopped jobs.
Thanks. (1) are such cases rare? (2) I don't know how to search for kill in the online hosted repository, even though you might have mentioned it before a little.
– Tim
Jan 4 at 13:35
(1) As rare, or otherwise, as sendingSIGHUP
. (2) Ctrl+F in your browser works wonders when searching in a single file ;-).
– Stephen Kitt
Jan 4 at 13:42
Does disown make interactive bash not send signals other than SIGHUP to a job?
– Tim
Jan 4 at 13:50
That question is nonsensical. What doesdisown
do? How does Bash know which processes are jobs it is supposed to manage?
– Stephen Kitt
Jan 4 at 14:07
Does this make sense? Does disown apply to SIGHUP only or also to some other signal(s)?
– Tim
Jan 4 at 14:19
|
show 10 more comments
Yes, there are a number of instances which can be found by searching calls to kill
and killpg
in jobs.c
in the Bash source code.
One example is the handling of stopped jobs when exec
is run, or when the shell exits: the shell sends SIGTERM
and SIGCONT
to all stopped jobs.
Yes, there are a number of instances which can be found by searching calls to kill
and killpg
in jobs.c
in the Bash source code.
One example is the handling of stopped jobs when exec
is run, or when the shell exits: the shell sends SIGTERM
and SIGCONT
to all stopped jobs.
answered Jan 4 at 13:32
Stephen KittStephen Kitt
166k24368449
166k24368449
Thanks. (1) are such cases rare? (2) I don't know how to search for kill in the online hosted repository, even though you might have mentioned it before a little.
– Tim
Jan 4 at 13:35
(1) As rare, or otherwise, as sendingSIGHUP
. (2) Ctrl+F in your browser works wonders when searching in a single file ;-).
– Stephen Kitt
Jan 4 at 13:42
Does disown make interactive bash not send signals other than SIGHUP to a job?
– Tim
Jan 4 at 13:50
That question is nonsensical. What doesdisown
do? How does Bash know which processes are jobs it is supposed to manage?
– Stephen Kitt
Jan 4 at 14:07
Does this make sense? Does disown apply to SIGHUP only or also to some other signal(s)?
– Tim
Jan 4 at 14:19
|
show 10 more comments
Thanks. (1) are such cases rare? (2) I don't know how to search for kill in the online hosted repository, even though you might have mentioned it before a little.
– Tim
Jan 4 at 13:35
(1) As rare, or otherwise, as sendingSIGHUP
. (2) Ctrl+F in your browser works wonders when searching in a single file ;-).
– Stephen Kitt
Jan 4 at 13:42
Does disown make interactive bash not send signals other than SIGHUP to a job?
– Tim
Jan 4 at 13:50
That question is nonsensical. What doesdisown
do? How does Bash know which processes are jobs it is supposed to manage?
– Stephen Kitt
Jan 4 at 14:07
Does this make sense? Does disown apply to SIGHUP only or also to some other signal(s)?
– Tim
Jan 4 at 14:19
Thanks. (1) are such cases rare? (2) I don't know how to search for kill in the online hosted repository, even though you might have mentioned it before a little.
– Tim
Jan 4 at 13:35
Thanks. (1) are such cases rare? (2) I don't know how to search for kill in the online hosted repository, even though you might have mentioned it before a little.
– Tim
Jan 4 at 13:35
(1) As rare, or otherwise, as sending
SIGHUP
. (2) Ctrl+F in your browser works wonders when searching in a single file ;-).– Stephen Kitt
Jan 4 at 13:42
(1) As rare, or otherwise, as sending
SIGHUP
. (2) Ctrl+F in your browser works wonders when searching in a single file ;-).– Stephen Kitt
Jan 4 at 13:42
Does disown make interactive bash not send signals other than SIGHUP to a job?
– Tim
Jan 4 at 13:50
Does disown make interactive bash not send signals other than SIGHUP to a job?
– Tim
Jan 4 at 13:50
That question is nonsensical. What does
disown
do? How does Bash know which processes are jobs it is supposed to manage?– Stephen Kitt
Jan 4 at 14:07
That question is nonsensical. What does
disown
do? How does Bash know which processes are jobs it is supposed to manage?– Stephen Kitt
Jan 4 at 14:07
Does this make sense? Does disown apply to SIGHUP only or also to some other signal(s)?
– Tim
Jan 4 at 14:19
Does this make sense? Does disown apply to SIGHUP only or also to some other signal(s)?
– Tim
Jan 4 at 14:19
|
show 10 more comments
In addition to what Stephen said,
it looks like bash sends SIGCONT to stopped processes
when you issue a fg
or bg
command, or otherwise resume a stopped job.
And it sends a SIGSTOP to itself when you issue a suspend
command.
add a comment |
In addition to what Stephen said,
it looks like bash sends SIGCONT to stopped processes
when you issue a fg
or bg
command, or otherwise resume a stopped job.
And it sends a SIGSTOP to itself when you issue a suspend
command.
add a comment |
In addition to what Stephen said,
it looks like bash sends SIGCONT to stopped processes
when you issue a fg
or bg
command, or otherwise resume a stopped job.
And it sends a SIGSTOP to itself when you issue a suspend
command.
In addition to what Stephen said,
it looks like bash sends SIGCONT to stopped processes
when you issue a fg
or bg
command, or otherwise resume a stopped job.
And it sends a SIGSTOP to itself when you issue a suspend
command.
answered Jan 6 at 7:05
G-ManG-Man
13k93365
13k93365
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492471%2fdoes-an-interactive-bash-process-implicitly-send-any-signal-other-than-sighup-to%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
the source code of bash does. e.g. interactive bash's SIGHUP handler does, huponexited and interactive bash's pre-termination cleanup does.
– Tim
Jan 4 at 13:18
to bash user, what bash does is implicit. to bash, what the kernel does is implicit. I meant the former.
– Tim
Jan 4 at 13:20