LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-09-2009, 08:45 AM   #1
raghu123
Member
 
Registered: May 2008
Posts: 34

Rep: Reputation: 15
Nohup and disown usage


HI all........

I have to run a program called vina that deals with molecular docking...I am doing ssh to some other machine and running ......but if i reboot or shut down my system, the job is getting killed.....i dont want this to happen.....help me

I used nohup which is not prone to hang-ups
like
after doing ssh user@ip

I run, my script like this
nohup script.sh &===> that has the commands.....


Or disown

$ script.sh&
$ disown <pid>
$ exit

then i reboot my system, the job gets killed....in the machine where i was running my script.....

WHAT IS THE CORRECT USAGE
so that even if the parent process is killed, the child should not die
 
Old 06-09-2009, 09:07 AM   #2
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
I'm a bit concerned that you're talking about rebooting w/out talking about logging out.

you should be able to :

log in
run nohup on your program
log out
log in again and verify that your program is still running

if you can do that then all is working. the remote system will never know that your local system is shutting down so it can't possibly affect it.
 
Old 06-09-2009, 10:03 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
what does nohup.out contain?

how do you know the script is dead?
what's in the script?

there's no way it can kill it unless they're linked
over the ssh connection somehow.
 
Old 06-09-2009, 10:04 AM   #4
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
You should try running the process with setsid.
Kevin Barry
 
Old 06-10-2009, 12:42 AM   #5
raghu123
Member
 
Registered: May 2008
Posts: 34

Original Poster
Rep: Reputation: 15
Ya .....i mean login
then run nohup
logout
shut down my system
 
Old 06-10-2009, 01:24 AM   #6
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
that does not make any sense. once you've logged out successfully, it is not possible to affect the script running on the remote system, by shutting down or any other event (short of logging back in again and doing something). Either you have left out some important information (like maybe it's writing data back to your system over the network?) or you are mistaken about what is causing the script to end.
 
Old 06-10-2009, 04:51 AM   #7
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
previous post is right.


if you won't supply more info we cannot really help can we now?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
disown problem (sh: disown: not found) grayFalcon Linux - Server 2 01-07-2008 06:20 AM
nohup, fg, bg and ctrl-z usage serge Linux - Software 1 06-11-2007 08:32 AM
problem with nohup command and nohup file size vbseeker Linux - General 1 09-17-2006 11:36 AM
How to create a bash script to automatically disown a process. jon_k Linux - Software 5 06-19-2005 05:53 AM
how to determine cpu usage, memory usage, I/O usage by a particular user logged on li rags2k Programming 4 08-21-2004 04:45 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:10 AM.

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