Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
07-23-2003, 09:23 AM
|
#1
|
LQ Newbie
Registered: Jul 2003
Posts: 6
Rep:
|
Starting processes from remote shell and keep them running...
My problem is that I would like to start a lenghty process from a remote shell, without having it terminated when the shell is closed. I would like to use putty or webmin for that purpose.
I already tried with nohup command, but to no avail, because the process is started as a child from sshd, and when I close putty on the remote computer everything is gone...
And I don't want to let 2 computers run just because one is processing something...
If anyone of you knows a smart way to do so, I would be very glad...
|
|
|
07-23-2003, 09:38 AM
|
#2
|
Senior Member
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251
Rep:
|
have you tried executing the command with a trailing '&'?
I just tested it out and the program I started on a remote machine is still running.
hth,
jpbarto
|
|
|
07-23-2003, 10:02 AM
|
#3
|
LQ Newbie
Registered: Jul 2003
Posts: 6
Original Poster
Rep:
|
Unfortunately not...
I did try with the ampersand, but unfortunately this doesn't work for me...
The process is sended to the background, but if I type exit in the shell, then it says: "there are stopped jobs" and shows me that it has stopped the job...
Nohup works better, putty doesn't stop the process then, but it is stopped when the ssh daemon closes the connection...
I will try using rlogin, and report here...
|
|
|
07-23-2003, 10:07 AM
|
#4
|
LQ Newbie
Registered: Jul 2003
Posts: 6
Original Poster
Rep:
|
I can't get rlogin to work, but I would anyways rather use SSH, because of the better security...
Maybe I should add that the remote computer is running WinXP here at work...
And I'm using Putty client for windows.
Last edited by johannes; 07-23-2003 at 10:08 AM.
|
|
|
07-23-2003, 10:24 AM
|
#5
|
Senior Member
Registered: Mar 2003
Location: Pittsburgh, PA
Distribution: Gentoo / NetBSD
Posts: 1,251
Rep:
|
so you ssh from winxp to a *nix box?
I don't know... but here's the experiment I tried between two slack9 boxes.
ssh into remote slack9 box,
write the following c-code:
int main (){
FILE * fp;
int i = 1;
fp = fopen ("test.output", "w");
while (i++){
fprintf (fp, "i is now %d\n", i);
fflush (fp);
sleep (10);
}
fclose (fp);
return i;
}
compiled it, ran it with '&' and then typed exit.
closed the xterm and walked over to remote machine... typed 'cat test.output'.
plus a ps revealed that the little thing was still running.
what linux are you ssh'ing into? Is this behavior perhaps configurable through sshd's config files?
|
|
|
07-23-2003, 10:38 AM
|
#6
|
LQ Newbie
Registered: Jul 2003
Posts: 6
Original Poster
Rep:
|
Sorry
Thank you all for your efforts and your help!
I just tried with the nohup option and the ampersand in the end again, and ran mencoder with it (which is the application I want to run), and it worked...
I was alway using "lynx www.google.com" before (out of a lack of fantasy) and that didn't survive the termination of the shell...
But mencoder does, and that's all I need...
I'm running debian woody...
Funny that lynx didn't stay alive and mencoder does, but that's maybe because it isn't able to output to nohup.out...
Thanks again for all your help!
|
|
|
All times are GMT -5. The time now is 01:14 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|