blob: 815dae3cd853a633135857778739b3349fbad33f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
int main(int argc, char *argv[]) {
if (!argv[1]) {
write(1, "you IDIOT, you forgot to include the file name, MORON\n", 55);
exit(1);
}
int fd2 = open(argv[1], O_RDWR | O_CREAT, S_IRUSR | S_IRGRP | S_IROTH);
exit(0);
}
|