Daimones, skotomoi, anilika tekna kai anamoni

V13 v13 at priest.com
Mon Mar 11 19:42:00 EET 2002


On Monday 11 March 2002 17:16, Dimitrios Stasinopoulos wrote:
> To zitima einai to eksis: Pos kanoume ton mpampa na pairnei ola ta exit
> codes ton mpompiron daimonion oste na min ginontai zombies, eno taftoxrona
> na akouei kai gia pithanes epikliseis?

 Bazeis diko soy signal handler gia to SIGCHLD o opoios me to poy tha klithei
kalei tin wait. H select tha epistrepsei me EINTR otan psofisei to paidi.
Paradeigma: (xoris select() )

#include <signal.h>
#include <unistd.h>
#include <stdio.h>
#include <wait.h>
#include <sys/types.h>

void chld(int n)
{
        int     k;

        printf("kokoko\n");
        fflush(stdout);
        wait(&k);
}

int main()
{
        signal(SIGCHLD,chld);
        if (fork())
        {
                while (1)
                        sleep(1000);
        }
}

> Ennoeitai oti to SIG_CHLD to ksaname all together logo select().
errr.. metafrasi ?

> Dimitris Stasinopoulos
<<V13>>



More information about the Linux-greek-users mailing list