Help - Search - Members - Calendar
Full Version: How can I make my program run in the background?
Linuxhelp > Support > Programming in Linux
Southy
I made some small basic programs for the linux OS using C/C++... they work fine and all when you run them from the command line (ex ./program1 ) but once you hit enter, it just sits there and if you close the konsole (this is in the KDE GUI btw) it then shuts down the program.

What I want to know is, is there a way to program it so that once you run it from the command line, it starts the program and runs in the background, much like an HTTP or any other server does and still runs in the background once you leave the command line or Konsole?
DS2K3
CODE
./program1 > /dev/null &


Will run the program, direct any console output to the bit bucket, and push the application to the background
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.