Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I use a DYNDNS for my website and use an program called inadyn in order to automaticly verify my IP address with DYNDNS.org every couple minutes as I have a DHCP lease from my ISP. Inadyn when run refreshes this info every couple minutes or so.
I feed inadyn my details via command line parameters, then apply a '&' at the end of the command in order to get it to run in the 'background' - I assume this is a good practice?
Anyway - I have a couple questions regarding this:
1.) Does this continue to run in the background even after I log off? ( via SSH )
2.) Is there anyway to 'call' this program back into the foreground so I can view its output again? After I feed it the & parameter it effectively disappears, albeit continues running. I'd like to get it 'back' when I like to view output if this is possible.
Sure, it'll continue to run as your user even after you log off.
Also, if you want to view any of your backgrounded jobs- use the command 'jobs'. To actually bring up the backgrounded job, use the command 'fg'.
1) AFAIK, when you log of most processes get killed. However some processes can detatch themselves and remain after you log off. From what I understand the shell kills the spawned process when you log off, but if the spawned process itself created another process then that does not get killed (correction or confirmation required).
The best way to go about something like this is to use the "GNU Screen" program. It would allow you to detach the terminal from the process and then reattach to it later.
2) To get the program back type in 'fg' (you can also read up about 'bg').
While logged in, I can use the jobs and bg commands to display and also 'mount' the background process again. However - after I log off and back on again, the process continues running, albeit is no longer retrievable via jobs or bg.
Are there any possible solutions to this - or is this a case of tough luck?
While logged in, I can use the jobs and bg commands to display and also 'mount' the background process again. However - after I log off and back on again, the process continues running, albeit is no longer retrievable via jobs or bg.
Are there any possible solutions to this - or is this a case of tough luck?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.