Solved

want to start my program in the background.

Posted on 2004-04-29
3
581 Views
Last Modified: 2010-04-20
i know how to start a program..

i just ssh in and go to the that directory and type ./start.sh

however, i need this program to run in the background b/c
when i killed my telnet program, i want this program continue to run.

what should i do??
0
Comment
Question by:bionicblakey
3 Comments
 
LVL 1

Accepted Solution

by:
jainrah earned 500 total points
ID: 10955117
the following command should do the job for you.

program_name & nohup

& : to make it run in the background
nohup : ti continue running it even after you logout.

hope this helps.
0
 
LVL 38

Expert Comment

by:yuzh
ID: 10955191
You can use nohup to do the job, the syntax should be

nohup /path-to/program &

man nohup

Or use the "screen" program to do the job, have a look at the following page for more
details: (you can download screen for your version of OS)
http://www.gnu.org/software/screen/
0
 
LVL 3

Expert Comment

by:tolgadalkilic
ID: 10955577
addition to yuzh's answer:

you can use some extra strings when you backgrounded your program to not to fill your login window with error or output messages from the program that you are running:

nohup /path-to/program 2>/dev/null 1>/dev/null&

2 and 1 are meaning that pipe the output and error messages to /dev/null
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now