All pastes #950943 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-20 22:49 UTC
rendered paste body

        char buf[HOST_BUF_LEN];

        int read_b, sent_b;

        if (fcntl(0, F_SETFL, O_NONBLOCK) < 0) {
                perror("fcntl");
                
        }
        while(read_b = fread(buf, sizeof(buf), 1, stdin)){

                fwrite(buf, sizeof(buf), 1, stdout);

        }
        perror("");