[ create a new paste ] login | about

Link: http://codepad.org/uJ0X8Bfh    [ raw code | output | fork ]

C, pasted on Jun 24:
1
2
3
4
5
6
7
8
9
10
11
12
#include <unistd.h>
#include <fcntl.h>
int main(void){

	int fd,ret;
        char buff[1024];
	fd = open("cat.c",O_RDONLY);
	while(ret = read(fd, buff, sizeof buff ) )
		write( 1, buff, ret);
	close(fd);
	return 0;
}


Output:
1
Timeout


Create a new paste based on this one


Comments: