diff options
Diffstat (limited to 'test3-a.c')
| -rw-r--r-- | test3-a.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test3-a.c b/test3-a.c new file mode 100644 index 0000000..632967f --- /dev/null +++ b/test3-a.c @@ -0,0 +1,25 @@ +/* + * test3 + */ + +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> + +int main(int argc, char *argv[]) +{ + printf("This is test3-a\n"); + int f; + f = open(argv[1], O_RDONLY); + if(f < 0) { + perror(""); + return 1; + } + if(close(f) != 0) { + perror(""); + return 1; + } + return 0; +} |
