Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 01-09-2003, 01:32 PM   #1
LQ Newbie
Registered: Jul 2002
Posts: 12

Rep: Reputation: 0
nohup failure

I have a script as follows:

/usr/openwin/bin/xhost +

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
Senior Member
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

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

nohup ( <your script> | telnet )&

(not tested)


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 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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:54 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration