1 /* Tries to open the same file twice,
2 which must succeed and must return a different file descriptor
7 #include "tests/main.h"
12 int h1 = open ("sample.txt");
13 int h2 = open ("sample.txt");
15 CHECK ((h1 = open ("sample.txt")) > 1, "open \"sample.txt\" once");
16 CHECK ((h2 = open ("sample.txt")) > 1, "open \"sample.txt\" again");
18 fail ("open() returned %d both times", h1);