From owner-freebsd-hackers Mon Dec 13 17:44: 0 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from fep02-svc.mail.telepac.pt (fep02-svc.mail.telepac.pt [194.65.5.201]) by hub.freebsd.org (Postfix) with ESMTP id AB035152CD for ; Mon, 13 Dec 1999 17:43:52 -0800 (PST) (envelope-from jpedras@webvolution.net) Received: from manecao.tafkap.priv ([212.55.187.66]) by fep02-svc.mail.telepac.pt (InterMail v4.01.01.02 201-229-111-106) with ESMTP id <19991214013942.UYJU10720.fep02-svc@manecao.tafkap.priv> for ; Tue, 14 Dec 1999 01:39:42 +0000 Content-Length: 767 Message-ID: X-Mailer: XFMail 1.3.1 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Tue, 14 Dec 1999 01:43:27 -0000 (GMT) From: Joao Pedras To: freebsd-hackers@freebsd.org Subject: bsd signals Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 #include #include 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