LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-28-2011, 03:58 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908
Blog Entries: 26

Rep: Reputation: 49
keep process running even after telnet session has been deliberately ended


I have ubuntu 10.04 & I telnet to windows vista.
Even if I create a hidden process (http://www.commandline.co.uk/chp/ ) from batch file . It seems the process gets killed when I end connection at port 23 to host.
Maybe , the hidden process created is still child of current telnet session so tree is killed as session ends.

Is there a way to keep process running even after telnet session has ended ?
 
Old 03-28-2011, 04:06 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

Whatever script or command you start in a session, telnet and/or SSH, gets terminated if you disconnect the session, even if you've put it in the background for as far as I know. Have a look at the nohup command to disconnect your command/script from the console/session:
Code:
man nohup
Kind regards,

Eric
 
Old 03-28-2011, 04:09 AM   #3
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
Actually I am running
'wget -b link -a log-file'
which gave message
'process sent to background with PID 2360'
but after I logout & login again , then I don't find wget.exe in tasklist which clearly indicates child wget of previous session ended.

Is there a way to create a process independent of telnet session ?
 
Old 03-28-2011, 04:20 AM   #4
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
there is NOT 'nohup' in windows .
I am trying 'at' command .
 
Old 03-28-2011, 04:25 AM   #5
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Sorry, didn't read correctly in your first post. If you connect from Linux to Windows and the process on the Windows side gets killed when you disconnect, then you should look at a Windows forum for a solution since the 'problem' clearly is Windows related. The nohup is indeed a Linux command to avoid the problem you have with Windows.

Kind regards,

Eric
 
1 members found this post helpful.
Old 03-28-2011, 06:00 AM   #6
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
Finally . I got solution
Code:
time /t @ this is current time
set /p tod=time to schedule task :-
at %tod% <command/batch-file>
You can verify using
schtasks /query /v /tn at<job ID>
This works in windows vista.

Still , I will say commands of linux are far ahead of windows (like there is no alternative of 'nohup' in vista)
 
Old 03-28-2011, 07:06 AM   #7
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

Although it being a Windows solution, thanks for sharing, sure it will be of use to others. And I completely agree with you, Linux is way ahead of Windoze on various things.

Kind regards,

Eric
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telnet session consumes 8KB which is never released after session is terminated NilesBor Linux - Kernel 1 04-24-2009 11:14 AM
Howto troubleshoot a process that ended unexpectedly DriveMeCrazy Solaris / OpenSolaris 1 07-06-2007 11:29 AM
Problems with ssh communication, session is not ended jjsan Linux - Server 0 06-10-2007 04:39 PM
Telnet Failed plus mysql ended ckamheng Slackware 2 12-09-2004 01:20 PM
Starting program remotely and have them continue to run after the session is ended OJAtkinson Linux - General 2 12-07-2004 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration