]>
Commit | Line | Data |
---|---|---|
86ec8038 AM |
1 | Fixes directory creation race condition (#653434) |
2 | ||
3 | Index: screen/screen.c | |
4 | =================================================================== | |
5 | --- screen.orig/screen.c 2012-06-21 01:43:09.000000000 +0200 | |
6 | +++ screen/screen.c 2012-06-21 01:44:31.000000000 +0200 | |
7 | @@ -1127,7 +1127,7 @@ | |
8 | sprintf(SockPath, "%s/S-%s", SockDir, LoginName); | |
9 | if (access(SockPath, F_OK)) | |
10 | { | |
11 | - if (mkdir(SockPath, 0700) == -1) | |
12 | + if (mkdir(SockPath, 0700) == -1 && errno != EEXIST) | |
13 | Panic(errno, "Cannot make directory '%s'", SockPath); | |
14 | (void) chown(SockPath, real_uid, real_gid); | |
15 | } |