sleep, wait and Ctrl+C propogation
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
If I have the following shell script
sleep 30s
And I hit Ctrl+C when the shell script is running, the sleep dies with it.
If I have the following shell script
sleep 30s &
wait
And I hit Ctrl+C when the shell script is running, the sleep continues on, and now has a parent of 1.
Why is that? Doesn't bash propagate Ctrl+C to all the children?
bash sleep wait
add a comment |Â
up vote
0
down vote
favorite
If I have the following shell script
sleep 30s
And I hit Ctrl+C when the shell script is running, the sleep dies with it.
If I have the following shell script
sleep 30s &
wait
And I hit Ctrl+C when the shell script is running, the sleep continues on, and now has a parent of 1.
Why is that? Doesn't bash propagate Ctrl+C to all the children?
bash sleep wait
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
If I have the following shell script
sleep 30s
And I hit Ctrl+C when the shell script is running, the sleep dies with it.
If I have the following shell script
sleep 30s &
wait
And I hit Ctrl+C when the shell script is running, the sleep continues on, and now has a parent of 1.
Why is that? Doesn't bash propagate Ctrl+C to all the children?
bash sleep wait
If I have the following shell script
sleep 30s
And I hit Ctrl+C when the shell script is running, the sleep dies with it.
If I have the following shell script
sleep 30s &
wait
And I hit Ctrl+C when the shell script is running, the sleep continues on, and now has a parent of 1.
Why is that? Doesn't bash propagate Ctrl+C to all the children?
bash sleep wait
bash sleep wait
asked 5 mins ago
Hari Sundararajan
778
778
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478563%2fsleep-wait-and-ctrlc-propogation%23new-answer', 'question_page');
);
Post as a guest
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
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
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