Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
the gist here is i have my own bash script loop that is constantly running in the background and it does a few things for me thats not important, the weird thing is recently as in just started today, the process seems to kill itself or at least disappear and not work anymore if i "killall startkde" now this should only kill kde but something seems to be happening to my other process now, called something completely different. It never used to be killed as well when i killed kde so i can't understand why now its started to happen. Does anybody have any ideas as to why its started to be killed.
i have to admit i've changed the script slightly and the permissions but the permissions are just locking down the script even more and the file shouldn't be able to exit the loop as i run it with a "while true; do" so its always supposed to run. There are no exit commands so it should be fine, whats the problem???
Thanks in advanced
Mark
Are you starting the script from within your KDE session? If so your going to have to nohup it... as when KDE dies it is going to trigger a hangup to any process started within it.
hi and thanks for your reply, no its starts from /etc/rc.local
it should be working fine its just weird that it used to work fine and now it doesn't, i've also got a very similar scrip on another server that does something slightly different but same idea applied and that one still works fine when i kill kde. That why i'm so confused hehe
ahh well actually thanks for your reply i've realised my error now, I initially was starting it from /etc/rc.local,but I recently added in a new feature which would allow the process to be killed and then it was started remotely via ssh command. This has been the reason the process was killed I expect, but if a kde session wasn’t running and I ran the normal ssh command would it then still be considered for hangup?? Plus it seems to work great if I use “nohup /target &”. That’s fine I can edit my current program scripts no problem to fix the current problems but is there an option that will make nohup run without needing to write the ongoing outputs of my process to /$home/nohup.out
due to the huge length of time the server is running for in other words as long as its got no errors its running and never turned off, there would be a huge amount of text to build up in that file and over such a huge period it would create a large file and you could say it would either need a limit to the amount that can be written to it, or to not have it writing the output to the file at all is what I’d prefer if possible?
is it really supposed to have the & on the end there, i can understand why you've got it "nohup CMD &" in that part but why here as well or was that just a mistake?? ">/dev/null &"
i see btw yes good idea just send output to null hehe doh! i should have seen that.
Actually now i have a different problem, if i "ssh user@serverIP nohup command > /dev/null". then when i shutdown the system that i ran the command on so it would remotely execute the process i'd started was killed as well, can i stop this.
eg:
s = server
s1 ssh command sent to s2
ssh root@s2 nohup thingy
then i shutdown s1 and the process i'd started to execute on s2 killed itself i guess its got something to do with the shutdown of s1 but i used the nohup command so why is it being killed and i need to stop it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.