LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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, 02: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, 06:40 PM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

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

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

(not tested)
 
  


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


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