All pastes #950962 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-03-20 23:00 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, 1, sizeof(buf), stdin)){

                fwrite(buf, 1, read_b, stdout);

        }
        perror("");