Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to run the c++ program in background(daemon process)

Status
Not open for further replies.

gumarein

Programmer
Aug 17, 2003
4
IN
Hi All,

I have c++ program which is need to be started as daemon process. Can anybody tell me how to do it. or some sample code.

Thanks
Gumare
 
Like this?
[tt]
SYNOPSIS
#include <unistd.h>

int daemon(int nochdir, int noclose);

DESCRIPTION
The daemon() function is for programs wishing to detach
themselves from the controlling terminal and run in the
background as system daemons.
[/tt]


--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top