1
0
mirror of https://github.com/ioacademy-jikim/debugging synced 2025-06-08 08:26:14 +00:00
2015-12-13 22:34:58 +09:00

18 lines
302 B
C

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
int main ( void )
{
int fd, n;
char buf[10];
fd = open("foo/bar/xyzzy", O_RDONLY); /* fails */
printf("fd = %d\n", fd);
n = read ( fd, buf, 10 );
printf ("n = %d\n", n);
return 0;
}