equal
deleted
inserted
replaced
213 res = ::listen(listener, 5); |
213 res = ::listen(listener, 5); |
214 if (res == 0) { |
214 if (res == 0) { |
215 RESTARTABLE(::chmod(initial_path, S_IREAD|S_IWRITE), res); |
215 RESTARTABLE(::chmod(initial_path, S_IREAD|S_IWRITE), res); |
216 if (res == 0) { |
216 if (res == 0) { |
217 // make sure the file is owned by the effective user and effective group |
217 // make sure the file is owned by the effective user and effective group |
218 // (this is the default on linux, but not on mac os) |
218 // e.g. default behavior on mac is that new files inherit the group of |
|
219 // the directory that they are created in |
219 RESTARTABLE(::chown(initial_path, geteuid(), getegid()), res); |
220 RESTARTABLE(::chown(initial_path, geteuid(), getegid()), res); |
220 if (res == 0) { |
221 if (res == 0) { |
221 res = ::rename(initial_path, path); |
222 res = ::rename(initial_path, path); |
222 } |
223 } |
223 } |
224 } |