Log a better error upon failing to open an fd in path watcher

I've been struggling with some intermittent failures, so I'm hoping the
code returned from `open` might shed some light on the issue.
This commit is contained in:
Nathan Sobo
2013-01-02 03:18:18 -07:00
parent 0851bedbe8
commit f0ee7a06f7

View File

@@ -164,7 +164,7 @@ static NSMutableArray *gPathWatchers;
int fd = open([path fileSystemRepresentation], O_EVTONLY, 0);
if (fd < 0) {
NSLog(@"WARNING: Could create file descriptor for path '%@'", path);
NSLog(@"WARNING: Could not create file descriptor for path '%@'. Error code %d.", path, fd);
return NO;
}