[syslog-ng]problem with syslog-ng
   
    niraj
     
    syslog-ng@lists.balabit.hu
       
    07 Apr 2005 10:38:27 +0530
    
    
  
I m facing problem with this code . 
When I execute this program it forks 2 process 
 A zombie syslog-ng process on the forked ID
 syslog-ng on the next pid 
but without while loop every thing is working properly
TIA
niraj
#include<iostream>
#include<unistd.h>
using namespace std;
int main()
{
int cpid;
cpid=fork();
  if(cpid==0)
  {
    if(execv( "/usr/local/sbin/syslog-ng" ,NULL)==-1)
     {
      cout<<"hello"<<endl;
     }
  cout<<"ok"<<endl;
 }
while(1)
{
;
 }
return 0;
}
~
~