Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10th September 2009, 04:31 PM
FFUser Offline
Registered User
 
Join Date: May 2009
Posts: 48
windows_xp_2003firefox
Disowning a process started in a ssh session

Hi -

I started a process in a PuTTY session that I want to survive after I've disconnected. I issued a `disown` on the process (forgot to add the -h option). I've attached a small summary of the commands issued within the PuTTY session as well as an excerpt from the pstree (essentially switched user contexts twice, issued command, suspended program, disown'ed, resumed program

Command summary
Code:
> su -
> ... 
> su -l <useraccount>
> ./myprogram
> kill -20 <pid_of_myprogram>
> disown
> kill -18 <pid_of_myprogram>
pstree
Code:
     |-sshd-+-sshd---sshd---bash---su---bash---su---bash---su---bash-+-bash
     |      |                                                        |-pstree
     |      |                                                        `-sh---[myprogram]
If I disconnect, will the program continue to run or will it survive the bash SIGHUP only to terminate when the ssh deamon thread terminates? If not, how may I ensure that the program will persist?

Thanks!
Reply With Quote
  #2  
Old 10th September 2009, 04:42 PM
Gödel's Avatar
Gödel Offline
Registered User
 
Join Date: Jul 2009
Location: London,England
Posts: 1,095
windows_vistaie
run it in screen

ctrl-a d to detach

logout

login later

screen -r to reattach
Reply With Quote
  #3  
Old 10th September 2009, 05:23 PM
FFUser Offline
Registered User
 
Join Date: May 2009
Posts: 48
windows_xp_2003firefox
Thanks! I'll give it a shot.

UPDATE - works perfectly

Last edited by FFUser; 10th September 2009 at 08:50 PM. Reason: Followup on result of solution.
Reply With Quote
Reply

Tags
disown, putty, ssh

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Session failed with 'Your session only lasted less than 10 seconds bla bla...' ffhjeon Using Fedora 2 12th July 2008 10:14 AM
shell script -> starting a process detached from the parent process in the background gimli Using Fedora 4 15th November 2007 11:11 AM
vsftpd doesn't work when started automatically, but works started manually oryan_dunn Servers & Networking 7 2nd February 2007 09:41 PM
stop print process started in thunderbird d2e2 Using Fedora 4 25th October 2004 10:37 PM


Current GMT-time: 08:36 (Monday, 20-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat