summaryrefslogtreecommitdiff
path: root/Tests/Kernel/path-resolution-race.cpp
blob: 804fbc1b520a8ec3b2feffa19c1d0b336b89a55e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <unistd.h>
#include <sys/stat.h>

int main()
{
    if (!fork()) {
        for (;;) {
            mkdir("/tmp/x", 0666);
            rmdir("/tmp/x");
        }
    }
    for (;;) {
        chdir("/tmp/x");
    }
    return 0;
}