LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-17-2011, 10:33 AM   #1
Fracker
Member
 
Registered: Mar 2009
Posts: 86

Rep: Reputation: 0
[Quick questions]


What happens when my session disconnect because of network problem while execution of bash script

Say my shell script takes like 5 hrs, with 5 statement one statement taking 1 hr each after 30 mins, my session disconnect, what will happen?

1) my 1st statement completes then no other statement get executed?
2) my all statements executes and then finish?
3) my 1st statement will also not be completed

I can see my 1st statement through processes, problem with 'ps' it don't show bash script name, even if it is in memorry

Also, what i need to put in my script so next time even after even disconnect my scripts remaining executing (other then nohup)

Last edited by Fracker; 04-17-2011 at 10:35 AM.
 
Old 04-17-2011, 12:10 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Please use useful and informative thread titles in future. The title should reflect the content, not be some sort of "meta title" saying that it's a question.

When a bash session terminates, the child processes will all terminate at the same time (save for certain issues like locking mechanisms which will cause some forms of delay if they are not able to respond the the terminate signals.)

Your questions are looking a fair bit like homework, I really hope that they are not. Why have you given us multiple choice?? Why are you excluding nohup in the last query? Those things like homework to me...
 
Old 04-17-2011, 03:00 PM   #3
Fracker
Member
 
Registered: Mar 2009
Posts: 86

Original Poster
Rep: Reputation: 0
Yeah i realize that after posting the question, i try to edit it but u can't change the title.

Any ways, thanks for the answer. After looking for a while i found the process was completely loss, and even 1st statement didn't finished properly.

now i will update my script completely so my process don't fail again.

*****
Closing this Thread
*****
 
Old 04-17-2011, 03:11 PM   #4
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721Reputation: 721
Mark the thread as solved.
 
  


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
Two quick (hopefully) questions Roy G. Biv Incognito 2 10-15-2009 09:48 AM
Quick questions JujitsuFreak Linux - Newbie 4 05-27-2005 10:12 PM
a few quick questions maybbach Linux - General 4 11-05-2004 04:14 AM
Two quick questions Mikel Sevrel Linux - Newbie 5 02-29-2004 01:47 PM
quick questions yocompia Slackware 5 06-20-2003 05:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration