Date: Tue, 14 Dec 1999 01:43:27 -0000 (GMT) From: Joao Pedras <jpedras@webvolution.net> To: freebsd-hackers@freebsd.org Subject: bsd signals Message-ID: <XFMail.991214014327.jpedras@webvolution.net>
next in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.991214014327.jpedras>
