Re: [PATCH] safe_create_leading_directories: fix race that could give a false negative

2013-03-17 Thread Junio C Hamano
Steven Walter writes: > If two processes are racing to create the same directory tree, they will > both see that the directory doesn't exist, both try to mkdir(), and one > of them will fail. This is okay, as we only care that the directory > gets created. So, we add a check for EEXIST from mkd

[PATCH] safe_create_leading_directories: fix race that could give a false negative

2013-03-17 Thread Steven Walter
If two processes are racing to create the same directory tree, they will both see that the directory doesn't exist, both try to mkdir(), and one of them will fail. This is okay, as we only care that the directory gets created. So, we add a check for EEXIST from mkdir, and continue if the director

Re: [PATCH] safe_create_leading_directories: fix race that could give a false negative

2013-03-16 Thread Junio C Hamano
Steven Walter writes: > If two processes are racing to create the same directory tree, they will > both see that the directory doesn't exist, both try to mkdir(), and one > of them will fail. This is okay, as we only care that the directory > gets created. So, we add a check for EEXIST from mkd

[PATCH] safe_create_leading_directories: fix race that could give a false negative

2013-03-16 Thread Steven Walter
If two processes are racing to create the same directory tree, they will both see that the directory doesn't exist, both try to mkdir(), and one of them will fail. This is okay, as we only care that the directory gets created. So, we add a check for EEXIST from mkdir, and continue if the director