On Fri, 22 Feb 2002, Serghei Amelian wrote:
> Acum vreau sa intre intr-o bucla si sa asculte un port.
cauta pe google dupa: simple tcp server C source
> Serghei.
>
> On Friday 22 February 2002 18:25, you wrote:
> > 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.
> ---
> 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.