LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 01-09-2003, 01:32 PM   #1
tn1681
LQ Newbie
 
Registered: Jul 2002
Posts: 12

Rep: Reputation: 0
nohup failure


I have a script as follows:


/usr/openwin/bin/xhost +

hostname=`hostname`
display=`awk ' /'$hostname'/ {print $1":0.0"}' /etc/hosts`

(echo "login"
sleep 2
echo "password"
echo "export DISPLAY=$display"
echo 'nohup ./command &'
sleep 5
exit) | telnet XXX.XXX.XXX.XXX

It is running in a KORN shell. After the 5 secong sleep, both the TERMINAL and the BACKGROUND process exit.

How can I keep the BACKGROUND process running?
Any help would be appreciated.....
 
Old 01-09-2003, 05:40 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Try using the nohup utility, using bash it would be somthing like:

nohup ( <your script> | telnet xxx.xxx.xxx.xxx )&

(not tested)
 
  


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
nohup retuncode krusty_lab Linux - General 2 10-13-2005 06:04 AM
help on nohup vinayuh Linux - General 3 07-22-2005 12:24 PM
nohup for X11 windows marcosm Linux - Software 3 04-12-2005 01:10 PM
nohup command chbin Slackware 1 03-31-2005 03:47 AM
How to nohup an already running program ? fluppi Linux - General 0 06-29-2004 03:47 AM

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

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