LinuxQuestions.org
Visit Jeremy's Blog.
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 01-30-2007, 11:12 AM   #1
beammeup
LQ Newbie
 
Registered: Mar 2005
Location: Worcester, MA
Distribution: RHEL 3, 4, 5, CentOS 5.x
Posts: 15

Rep: Reputation: 0
nohup command in script doesn't return to system console prompt


Hi,

I have a script that I am using to start a process with the nohup command and it does not return to the console prompt upon completion of the script.

Has anyone seen this and what might I be missing from the nohup line?

The line reads like this:

nohup ./start_iq8dfserver.sh </dev/null \ &

I've also tried it without the </dev/null \ and with out the \ at the end before the &.

Thanks
 
Old 01-30-2007, 03:21 PM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
It's mystical.. It should return to console immediately after starting script - when you do not put '\' before '&'. Does
'while true; do echo >/dev/null; done &' go to background ? To stop it run 'fg' and press 'Ctrl-C'.
 
Old 02-05-2007, 09:21 AM   #3
dhowe
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
We tried the 'while true; do echo >/dev/null; done &' and it does go to the background. But the script doesn't with us manually hittihg enter.
 
Old 02-05-2007, 09:42 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Any clues in "nohup.out"?
 
Old 02-05-2007, 02:01 PM   #5
dhowe
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
I found a work around seems to be working for us. I changed the code to:

nohup ./start_iq8dfserver.sh >>nohup.out 2>&1 &
 
  


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
problem with nohup command and nohup file size vbseeker Linux - General 1 09-17-2006 11:36 AM
Difference between Console, Shell, and Command Prompt Anupam Pathak Linux - Newbie 3 10-23-2005 04:40 AM
command runs at prompt not in script newbie_m Linux - Newbie 2 01-20-2005 02:12 PM
Where do I edit the system wide command prompt? Brakki Linux - General 1 04-13-2004 12:02 AM
how set system time by command prompt? yenonn Linux - Newbie 9 08-25-2003 06:40 PM

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

All times are GMT -5. The time now is 04:53 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