Hello all
I am new to C so I need a little help on this one.
I am in need for something that calls an app and leaves it running. What is so
special about this is that this app is called by php3 scripts.
A very good soul handed these lines of code which work perfectly well in
FreeBSD :
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int pid;
pid=fork();
if (pid!=0)
{
pid=setsid();
close(STDOUT_FILENO);
close(STDIN_FILENO);
close(STDERR_FILENO);
execl(argv[1],argv[2],0);
}
return 0;
}
The problem is : how to make this work on linux systems ??
This works perfectly on my FreeBSD systems, but a single linux box needs this
functionality.
Any help would appreciated.
Thanks
Joao
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message