Hello,
can anyone, please, point out a C skeleton for FreeBSD daemon.
Is the following simple example correct for FreeBSD?
if (getppid() != 1)
{
signal(SIGTTOU, SIG_IGN);
signal(SIGTTIN, SIG_IGN);
signal(SIGTSTP, SIG_IGN);
if (fork() != 0)
exit(0);
setsid();
}
getrlimit(RLIMIT_NOFILE, &fli
man 3 daemon
On Fri, Feb 15, 2002 at 11:52:22AM +0300, Magdalinin Kirill wrote:
> Hello,
>
> can anyone, please, point out a C skeleton for FreeBSD daemon.
> Is the following simple example correct for FreeBSD?
>
> if (getppid() != 1)
> {
> signal(SIGTTOU, SIG_IGN);
> signal(SIGTTIN, SIG_IGN);
On 11:52+0300, Feb 15, 2002, Magdalinin Kirill wrote:
> Hello,
>
> can anyone, please, point out a C skeleton for FreeBSD daemon.
Take a look at src/lib/libc/gen/daemon.c, man 3 daemon
HTH,
--
Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer
phone: +7 (095) 796-9079, mailto
try
daemon(args..);
.
(man 3 daemon)
On Fri, 15 Feb 2002, Magdalinin Kirill wrote:
> Hello,
>
> can anyone, please, point out a C skeleton for FreeBSD daemon.
> Is the following simple example correct for FreeBSD?
>
> if (getppid() != 1)
> {
> signal(SIGTTOU, SIG_IGN);
> sig
4 matches
Mail list logo