sleep command using screen command is not displayed in ps





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







4















I'm running the sleep command in terminal using screen and in detached mode.

Once the screen immediately returns, I'm running ps command to verify the sleep is running.



$ screen -d -m 'sleep 2m'
[raj@localhost ~]$ ps
PID TTY TIME CMD
22795 pts/0 00:00:00 bash
22869 pts/0 00:00:00 ps


But the command didn't show sleep. What is that I'm doing wrong here?










share|improve this question

























  • why would you want to run sleep through a detached screen ? couldn’t you just run it as sleep 2m & directly from your shell ? besides, ps alone shows only processes belonging to your terminal window, while whatever you run through screen will belong to a different virtual terminal

    – LL3
    2 days ago













  • @LL3 - I'm doing it as a poc to run a command from remote machine using screen and detach from screen. I have tried using ps -a | grep sleep still it is not showing any new process running sleep.

    – Rajkumar Natarajan
    2 days ago




















4















I'm running the sleep command in terminal using screen and in detached mode.

Once the screen immediately returns, I'm running ps command to verify the sleep is running.



$ screen -d -m 'sleep 2m'
[raj@localhost ~]$ ps
PID TTY TIME CMD
22795 pts/0 00:00:00 bash
22869 pts/0 00:00:00 ps


But the command didn't show sleep. What is that I'm doing wrong here?










share|improve this question

























  • why would you want to run sleep through a detached screen ? couldn’t you just run it as sleep 2m & directly from your shell ? besides, ps alone shows only processes belonging to your terminal window, while whatever you run through screen will belong to a different virtual terminal

    – LL3
    2 days ago













  • @LL3 - I'm doing it as a poc to run a command from remote machine using screen and detach from screen. I have tried using ps -a | grep sleep still it is not showing any new process running sleep.

    – Rajkumar Natarajan
    2 days ago
















4












4








4








I'm running the sleep command in terminal using screen and in detached mode.

Once the screen immediately returns, I'm running ps command to verify the sleep is running.



$ screen -d -m 'sleep 2m'
[raj@localhost ~]$ ps
PID TTY TIME CMD
22795 pts/0 00:00:00 bash
22869 pts/0 00:00:00 ps


But the command didn't show sleep. What is that I'm doing wrong here?










share|improve this question
















I'm running the sleep command in terminal using screen and in detached mode.

Once the screen immediately returns, I'm running ps command to verify the sleep is running.



$ screen -d -m 'sleep 2m'
[raj@localhost ~]$ ps
PID TTY TIME CMD
22795 pts/0 00:00:00 bash
22869 pts/0 00:00:00 ps


But the command didn't show sleep. What is that I'm doing wrong here?







scripting gnu-screen ps






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









Monty Harder

22415




22415










asked 2 days ago









Rajkumar NatarajanRajkumar Natarajan

1447




1447













  • why would you want to run sleep through a detached screen ? couldn’t you just run it as sleep 2m & directly from your shell ? besides, ps alone shows only processes belonging to your terminal window, while whatever you run through screen will belong to a different virtual terminal

    – LL3
    2 days ago













  • @LL3 - I'm doing it as a poc to run a command from remote machine using screen and detach from screen. I have tried using ps -a | grep sleep still it is not showing any new process running sleep.

    – Rajkumar Natarajan
    2 days ago





















  • why would you want to run sleep through a detached screen ? couldn’t you just run it as sleep 2m & directly from your shell ? besides, ps alone shows only processes belonging to your terminal window, while whatever you run through screen will belong to a different virtual terminal

    – LL3
    2 days ago













  • @LL3 - I'm doing it as a poc to run a command from remote machine using screen and detach from screen. I have tried using ps -a | grep sleep still it is not showing any new process running sleep.

    – Rajkumar Natarajan
    2 days ago



















why would you want to run sleep through a detached screen ? couldn’t you just run it as sleep 2m & directly from your shell ? besides, ps alone shows only processes belonging to your terminal window, while whatever you run through screen will belong to a different virtual terminal

– LL3
2 days ago







why would you want to run sleep through a detached screen ? couldn’t you just run it as sleep 2m & directly from your shell ? besides, ps alone shows only processes belonging to your terminal window, while whatever you run through screen will belong to a different virtual terminal

– LL3
2 days ago















@LL3 - I'm doing it as a poc to run a command from remote machine using screen and detach from screen. I have tried using ps -a | grep sleep still it is not showing any new process running sleep.

– Rajkumar Natarajan
2 days ago







@LL3 - I'm doing it as a poc to run a command from remote machine using screen and detach from screen. I have tried using ps -a | grep sleep still it is not showing any new process running sleep.

– Rajkumar Natarajan
2 days ago












2 Answers
2






active

oldest

votes


















10














This was confusing to me initially as well. I then re-read the local screen man page for the SYNOPSIS -- the online man page does not give a synopsis) -- and noticed that it said:




screen [ -options ] [ cmd [ args ] ]



... which led me to believe that it wanted to see the cmd and args as independent arguments.



Since you gave that first argument as a quoted value -- 'sleep 2m' -- it tried to execute a command named (exactly) 'sleep 2m', as opposed to what you really wanted, which was sleep with its own argument of 2m. The screen command exited successfully (in my testing), but it did not successfully execute your command.



Use, instead:



screen -d -m sleep 2m


Instead of ps, which will only show processes associated with the current terminal (of which the SCREEN and related processes are not), use:



ps x


which will show it:



$ ps x
PID TTY STAT TIME COMMAND
# ...
7514 pts/1 Ss 0:00 -bash
7761 ? Ss 0:00 SCREEN -d -m sleep 2m
7762 pts/2 Ss+ 0:00 sleep 2m
7880 pts/1 R+ 0:00 ps x
# ...





share|improve this answer


























  • You say “screen expected the command in the first argument”, and then you show a command line where the secondary command (the command to be invoked by the primary command) is spread out over argv[3] and argv[4]. I expect that some people will be confused by this.

    – G-Man
    yesterday











  • Would it help if I said "first non-option argument"? I intended the translation to be from "'sleep 2m'" to "sleep", but I want to reduce confusion, not generate more!

    – Jeff Schaller
    yesterday






  • 1





    I suppose that would be less unclear, but not really better.  Maybe you want to say that the secondary command verb and the arguments to the secondary command must be separate arguments to the primary command, like with find -exec, sudo and xargs, and different from the way sh -c and some other commands require it.

    – G-Man
    yesterday













  • I've updated the post to include some more analysis of the commands & args. Please take a look and see if that helps, and let me know if you see any further improvements. Thank you!

    – Jeff Schaller
    yesterday











  • Very good.  I might have mentioned find -exec, sudo, xargs, and sh -c in the answer, but perhaps that would be information overload.  If we leave my second comment, I don’t believe that the answer needs any more changes.

    – G-Man
    yesterday



















0














Would using nohup suffice? It will show in ps where as running it in screen may make the process hidden within the screen process.



An example of this would be from bash..



nohup your-command &


If you want to exit this terminal session you may want to use an at job command..



at now + 1 minute

nohup your-command &

(ctrl-d)





share|improve this answer










New contributor




Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • (1) This is confusing.  You talk about a script and redirecting the standard output, neither of which is in the question.  On the other hand, the question features a sleep command, which your answer doesn’t mention. (2) Can you explain why you believe that nohup will help?  Do you believe that some process (e.g., sleep) is getting a hangup signal? … (Cont’d)

    – G-Man
    yesterday











  • (Cont’d) … (3) Using nohup would probably not suffice. Jeff’s answer presents two reasons why the user is not seeing the result they’re expecting. Adding nohup might be necessary also, but, by itself, it’s not likely to be enough.

    – G-Man
    yesterday











  • I’ve made it more clear. Was just pasting a real life example and hadn’t considered the confusion. Sorry.

    – Strainger
    yesterday












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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511443%2fsleep-command-using-screen-command-is-not-displayed-in-ps%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









10














This was confusing to me initially as well. I then re-read the local screen man page for the SYNOPSIS -- the online man page does not give a synopsis) -- and noticed that it said:




screen [ -options ] [ cmd [ args ] ]



... which led me to believe that it wanted to see the cmd and args as independent arguments.



Since you gave that first argument as a quoted value -- 'sleep 2m' -- it tried to execute a command named (exactly) 'sleep 2m', as opposed to what you really wanted, which was sleep with its own argument of 2m. The screen command exited successfully (in my testing), but it did not successfully execute your command.



Use, instead:



screen -d -m sleep 2m


Instead of ps, which will only show processes associated with the current terminal (of which the SCREEN and related processes are not), use:



ps x


which will show it:



$ ps x
PID TTY STAT TIME COMMAND
# ...
7514 pts/1 Ss 0:00 -bash
7761 ? Ss 0:00 SCREEN -d -m sleep 2m
7762 pts/2 Ss+ 0:00 sleep 2m
7880 pts/1 R+ 0:00 ps x
# ...





share|improve this answer


























  • You say “screen expected the command in the first argument”, and then you show a command line where the secondary command (the command to be invoked by the primary command) is spread out over argv[3] and argv[4]. I expect that some people will be confused by this.

    – G-Man
    yesterday











  • Would it help if I said "first non-option argument"? I intended the translation to be from "'sleep 2m'" to "sleep", but I want to reduce confusion, not generate more!

    – Jeff Schaller
    yesterday






  • 1





    I suppose that would be less unclear, but not really better.  Maybe you want to say that the secondary command verb and the arguments to the secondary command must be separate arguments to the primary command, like with find -exec, sudo and xargs, and different from the way sh -c and some other commands require it.

    – G-Man
    yesterday













  • I've updated the post to include some more analysis of the commands & args. Please take a look and see if that helps, and let me know if you see any further improvements. Thank you!

    – Jeff Schaller
    yesterday











  • Very good.  I might have mentioned find -exec, sudo, xargs, and sh -c in the answer, but perhaps that would be information overload.  If we leave my second comment, I don’t believe that the answer needs any more changes.

    – G-Man
    yesterday
















10














This was confusing to me initially as well. I then re-read the local screen man page for the SYNOPSIS -- the online man page does not give a synopsis) -- and noticed that it said:




screen [ -options ] [ cmd [ args ] ]



... which led me to believe that it wanted to see the cmd and args as independent arguments.



Since you gave that first argument as a quoted value -- 'sleep 2m' -- it tried to execute a command named (exactly) 'sleep 2m', as opposed to what you really wanted, which was sleep with its own argument of 2m. The screen command exited successfully (in my testing), but it did not successfully execute your command.



Use, instead:



screen -d -m sleep 2m


Instead of ps, which will only show processes associated with the current terminal (of which the SCREEN and related processes are not), use:



ps x


which will show it:



$ ps x
PID TTY STAT TIME COMMAND
# ...
7514 pts/1 Ss 0:00 -bash
7761 ? Ss 0:00 SCREEN -d -m sleep 2m
7762 pts/2 Ss+ 0:00 sleep 2m
7880 pts/1 R+ 0:00 ps x
# ...





share|improve this answer


























  • You say “screen expected the command in the first argument”, and then you show a command line where the secondary command (the command to be invoked by the primary command) is spread out over argv[3] and argv[4]. I expect that some people will be confused by this.

    – G-Man
    yesterday











  • Would it help if I said "first non-option argument"? I intended the translation to be from "'sleep 2m'" to "sleep", but I want to reduce confusion, not generate more!

    – Jeff Schaller
    yesterday






  • 1





    I suppose that would be less unclear, but not really better.  Maybe you want to say that the secondary command verb and the arguments to the secondary command must be separate arguments to the primary command, like with find -exec, sudo and xargs, and different from the way sh -c and some other commands require it.

    – G-Man
    yesterday













  • I've updated the post to include some more analysis of the commands & args. Please take a look and see if that helps, and let me know if you see any further improvements. Thank you!

    – Jeff Schaller
    yesterday











  • Very good.  I might have mentioned find -exec, sudo, xargs, and sh -c in the answer, but perhaps that would be information overload.  If we leave my second comment, I don’t believe that the answer needs any more changes.

    – G-Man
    yesterday














10












10








10







This was confusing to me initially as well. I then re-read the local screen man page for the SYNOPSIS -- the online man page does not give a synopsis) -- and noticed that it said:




screen [ -options ] [ cmd [ args ] ]



... which led me to believe that it wanted to see the cmd and args as independent arguments.



Since you gave that first argument as a quoted value -- 'sleep 2m' -- it tried to execute a command named (exactly) 'sleep 2m', as opposed to what you really wanted, which was sleep with its own argument of 2m. The screen command exited successfully (in my testing), but it did not successfully execute your command.



Use, instead:



screen -d -m sleep 2m


Instead of ps, which will only show processes associated with the current terminal (of which the SCREEN and related processes are not), use:



ps x


which will show it:



$ ps x
PID TTY STAT TIME COMMAND
# ...
7514 pts/1 Ss 0:00 -bash
7761 ? Ss 0:00 SCREEN -d -m sleep 2m
7762 pts/2 Ss+ 0:00 sleep 2m
7880 pts/1 R+ 0:00 ps x
# ...





share|improve this answer















This was confusing to me initially as well. I then re-read the local screen man page for the SYNOPSIS -- the online man page does not give a synopsis) -- and noticed that it said:




screen [ -options ] [ cmd [ args ] ]



... which led me to believe that it wanted to see the cmd and args as independent arguments.



Since you gave that first argument as a quoted value -- 'sleep 2m' -- it tried to execute a command named (exactly) 'sleep 2m', as opposed to what you really wanted, which was sleep with its own argument of 2m. The screen command exited successfully (in my testing), but it did not successfully execute your command.



Use, instead:



screen -d -m sleep 2m


Instead of ps, which will only show processes associated with the current terminal (of which the SCREEN and related processes are not), use:



ps x


which will show it:



$ ps x
PID TTY STAT TIME COMMAND
# ...
7514 pts/1 Ss 0:00 -bash
7761 ? Ss 0:00 SCREEN -d -m sleep 2m
7762 pts/2 Ss+ 0:00 sleep 2m
7880 pts/1 R+ 0:00 ps x
# ...






share|improve this answer














share|improve this answer



share|improve this answer








edited yesterday

























answered 2 days ago









Jeff SchallerJeff Schaller

45k1164147




45k1164147













  • You say “screen expected the command in the first argument”, and then you show a command line where the secondary command (the command to be invoked by the primary command) is spread out over argv[3] and argv[4]. I expect that some people will be confused by this.

    – G-Man
    yesterday











  • Would it help if I said "first non-option argument"? I intended the translation to be from "'sleep 2m'" to "sleep", but I want to reduce confusion, not generate more!

    – Jeff Schaller
    yesterday






  • 1





    I suppose that would be less unclear, but not really better.  Maybe you want to say that the secondary command verb and the arguments to the secondary command must be separate arguments to the primary command, like with find -exec, sudo and xargs, and different from the way sh -c and some other commands require it.

    – G-Man
    yesterday













  • I've updated the post to include some more analysis of the commands & args. Please take a look and see if that helps, and let me know if you see any further improvements. Thank you!

    – Jeff Schaller
    yesterday











  • Very good.  I might have mentioned find -exec, sudo, xargs, and sh -c in the answer, but perhaps that would be information overload.  If we leave my second comment, I don’t believe that the answer needs any more changes.

    – G-Man
    yesterday



















  • You say “screen expected the command in the first argument”, and then you show a command line where the secondary command (the command to be invoked by the primary command) is spread out over argv[3] and argv[4]. I expect that some people will be confused by this.

    – G-Man
    yesterday











  • Would it help if I said "first non-option argument"? I intended the translation to be from "'sleep 2m'" to "sleep", but I want to reduce confusion, not generate more!

    – Jeff Schaller
    yesterday






  • 1





    I suppose that would be less unclear, but not really better.  Maybe you want to say that the secondary command verb and the arguments to the secondary command must be separate arguments to the primary command, like with find -exec, sudo and xargs, and different from the way sh -c and some other commands require it.

    – G-Man
    yesterday













  • I've updated the post to include some more analysis of the commands & args. Please take a look and see if that helps, and let me know if you see any further improvements. Thank you!

    – Jeff Schaller
    yesterday











  • Very good.  I might have mentioned find -exec, sudo, xargs, and sh -c in the answer, but perhaps that would be information overload.  If we leave my second comment, I don’t believe that the answer needs any more changes.

    – G-Man
    yesterday

















You say “screen expected the command in the first argument”, and then you show a command line where the secondary command (the command to be invoked by the primary command) is spread out over argv[3] and argv[4]. I expect that some people will be confused by this.

– G-Man
yesterday





You say “screen expected the command in the first argument”, and then you show a command line where the secondary command (the command to be invoked by the primary command) is spread out over argv[3] and argv[4]. I expect that some people will be confused by this.

– G-Man
yesterday













Would it help if I said "first non-option argument"? I intended the translation to be from "'sleep 2m'" to "sleep", but I want to reduce confusion, not generate more!

– Jeff Schaller
yesterday





Would it help if I said "first non-option argument"? I intended the translation to be from "'sleep 2m'" to "sleep", but I want to reduce confusion, not generate more!

– Jeff Schaller
yesterday




1




1





I suppose that would be less unclear, but not really better.  Maybe you want to say that the secondary command verb and the arguments to the secondary command must be separate arguments to the primary command, like with find -exec, sudo and xargs, and different from the way sh -c and some other commands require it.

– G-Man
yesterday







I suppose that would be less unclear, but not really better.  Maybe you want to say that the secondary command verb and the arguments to the secondary command must be separate arguments to the primary command, like with find -exec, sudo and xargs, and different from the way sh -c and some other commands require it.

– G-Man
yesterday















I've updated the post to include some more analysis of the commands & args. Please take a look and see if that helps, and let me know if you see any further improvements. Thank you!

– Jeff Schaller
yesterday





I've updated the post to include some more analysis of the commands & args. Please take a look and see if that helps, and let me know if you see any further improvements. Thank you!

– Jeff Schaller
yesterday













Very good.  I might have mentioned find -exec, sudo, xargs, and sh -c in the answer, but perhaps that would be information overload.  If we leave my second comment, I don’t believe that the answer needs any more changes.

– G-Man
yesterday





Very good.  I might have mentioned find -exec, sudo, xargs, and sh -c in the answer, but perhaps that would be information overload.  If we leave my second comment, I don’t believe that the answer needs any more changes.

– G-Man
yesterday













0














Would using nohup suffice? It will show in ps where as running it in screen may make the process hidden within the screen process.



An example of this would be from bash..



nohup your-command &


If you want to exit this terminal session you may want to use an at job command..



at now + 1 minute

nohup your-command &

(ctrl-d)





share|improve this answer










New contributor




Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • (1) This is confusing.  You talk about a script and redirecting the standard output, neither of which is in the question.  On the other hand, the question features a sleep command, which your answer doesn’t mention. (2) Can you explain why you believe that nohup will help?  Do you believe that some process (e.g., sleep) is getting a hangup signal? … (Cont’d)

    – G-Man
    yesterday











  • (Cont’d) … (3) Using nohup would probably not suffice. Jeff’s answer presents two reasons why the user is not seeing the result they’re expecting. Adding nohup might be necessary also, but, by itself, it’s not likely to be enough.

    – G-Man
    yesterday











  • I’ve made it more clear. Was just pasting a real life example and hadn’t considered the confusion. Sorry.

    – Strainger
    yesterday
















0














Would using nohup suffice? It will show in ps where as running it in screen may make the process hidden within the screen process.



An example of this would be from bash..



nohup your-command &


If you want to exit this terminal session you may want to use an at job command..



at now + 1 minute

nohup your-command &

(ctrl-d)





share|improve this answer










New contributor




Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • (1) This is confusing.  You talk about a script and redirecting the standard output, neither of which is in the question.  On the other hand, the question features a sleep command, which your answer doesn’t mention. (2) Can you explain why you believe that nohup will help?  Do you believe that some process (e.g., sleep) is getting a hangup signal? … (Cont’d)

    – G-Man
    yesterday











  • (Cont’d) … (3) Using nohup would probably not suffice. Jeff’s answer presents two reasons why the user is not seeing the result they’re expecting. Adding nohup might be necessary also, but, by itself, it’s not likely to be enough.

    – G-Man
    yesterday











  • I’ve made it more clear. Was just pasting a real life example and hadn’t considered the confusion. Sorry.

    – Strainger
    yesterday














0












0








0







Would using nohup suffice? It will show in ps where as running it in screen may make the process hidden within the screen process.



An example of this would be from bash..



nohup your-command &


If you want to exit this terminal session you may want to use an at job command..



at now + 1 minute

nohup your-command &

(ctrl-d)





share|improve this answer










New contributor




Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










Would using nohup suffice? It will show in ps where as running it in screen may make the process hidden within the screen process.



An example of this would be from bash..



nohup your-command &


If you want to exit this terminal session you may want to use an at job command..



at now + 1 minute

nohup your-command &

(ctrl-d)






share|improve this answer










New contributor




Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer








edited yesterday





















New contributor




Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered yesterday









StraingerStrainger

11




11




New contributor




Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Strainger is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • (1) This is confusing.  You talk about a script and redirecting the standard output, neither of which is in the question.  On the other hand, the question features a sleep command, which your answer doesn’t mention. (2) Can you explain why you believe that nohup will help?  Do you believe that some process (e.g., sleep) is getting a hangup signal? … (Cont’d)

    – G-Man
    yesterday











  • (Cont’d) … (3) Using nohup would probably not suffice. Jeff’s answer presents two reasons why the user is not seeing the result they’re expecting. Adding nohup might be necessary also, but, by itself, it’s not likely to be enough.

    – G-Man
    yesterday











  • I’ve made it more clear. Was just pasting a real life example and hadn’t considered the confusion. Sorry.

    – Strainger
    yesterday



















  • (1) This is confusing.  You talk about a script and redirecting the standard output, neither of which is in the question.  On the other hand, the question features a sleep command, which your answer doesn’t mention. (2) Can you explain why you believe that nohup will help?  Do you believe that some process (e.g., sleep) is getting a hangup signal? … (Cont’d)

    – G-Man
    yesterday











  • (Cont’d) … (3) Using nohup would probably not suffice. Jeff’s answer presents two reasons why the user is not seeing the result they’re expecting. Adding nohup might be necessary also, but, by itself, it’s not likely to be enough.

    – G-Man
    yesterday











  • I’ve made it more clear. Was just pasting a real life example and hadn’t considered the confusion. Sorry.

    – Strainger
    yesterday

















(1) This is confusing.  You talk about a script and redirecting the standard output, neither of which is in the question.  On the other hand, the question features a sleep command, which your answer doesn’t mention. (2) Can you explain why you believe that nohup will help?  Do you believe that some process (e.g., sleep) is getting a hangup signal? … (Cont’d)

– G-Man
yesterday





(1) This is confusing.  You talk about a script and redirecting the standard output, neither of which is in the question.  On the other hand, the question features a sleep command, which your answer doesn’t mention. (2) Can you explain why you believe that nohup will help?  Do you believe that some process (e.g., sleep) is getting a hangup signal? … (Cont’d)

– G-Man
yesterday













(Cont’d) … (3) Using nohup would probably not suffice. Jeff’s answer presents two reasons why the user is not seeing the result they’re expecting. Adding nohup might be necessary also, but, by itself, it’s not likely to be enough.

– G-Man
yesterday





(Cont’d) … (3) Using nohup would probably not suffice. Jeff’s answer presents two reasons why the user is not seeing the result they’re expecting. Adding nohup might be necessary also, but, by itself, it’s not likely to be enough.

– G-Man
yesterday













I’ve made it more clear. Was just pasting a real life example and hadn’t considered the confusion. Sorry.

– Strainger
yesterday





I’ve made it more clear. Was just pasting a real life example and hadn’t considered the confusion. Sorry.

– Strainger
yesterday


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511443%2fsleep-command-using-screen-command-is-not-displayed-in-ps%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

香粉寮

GameSpot