summaryrefslogtreecommitdiff
path: root/test3-b.c
diff options
context:
space:
mode:
Diffstat (limited to 'test3-b.c')
-rw-r--r--test3-b.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/test3-b.c b/test3-b.c
new file mode 100644
index 0000000..b4cf576
--- /dev/null
+++ b/test3-b.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-b\n");
+ int f;
+ f = open(argv[1], O_WRONLY);
+ if(f < 0) {
+ perror("");
+ return 1;
+ }
+ if(close(f) != 0) {
+ perror("");
+ return 1;
+ }
+ return 0;
+}