salut,


cam asa e ..
ideea e sa faci un fork .. adica un fiu al procesului initial .. si apoi
omori pe tacso.. (criminala kestie)

#include <stdio.h>
#include <unistd.h>

int main()
{
        pid_t pid;

        if ( (pid = fork()) < 0)
                exit(fprintf(stderr, "Fork error.\n"));
        else if (pid != 0)
                exit(0);
        puts("sunt daemon");

        close(0); close(1); close(2);

        /* de aici incolo e daemon  si ai stdin, out si err inchise*/

        return 0;
}


On Fri, 22 Feb 2002, Serghei Amelian wrote:

> Stie cineva unde pot gasi un exemplu despre cum se scrie un daemon simplu?
>
> Serghei.
> ---
> Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
> unsubscribe from this list.
>


-----
Ionut Spirlea,
http://sgi.rdscv.ro/~ionuts/


---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to 
unsubscribe from this list.

Raspunde prin e-mail lui