All pastes #478934 Raw Edit

Something

public text v1 · immutable
·published 2007-05-09 13:26 UTC
rendered paste body

/* 

    if (la_tete>sck == sck) {


    }

    else {

        while (peer->next != NULL && !del) {

            if (peer->next->sck == sck) {

                /* Blocking a signal means telling the
                 * operating system to hold it and deliver
                 * it later. The peers list is shared
                 * between the process and the signal handler,
                 * it's why we must keep this part atomic.
                 */
                sigprocmask(SIG_BLOCK, &block_sigio, NULL);
                peer->next = peer->next->next;
                sigprocmask(SIG_UNBLOCK, &block_sigio, NULL);

                free(peer);

                del = 1;
            }

            peer = peer->next;
        }