summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eb49460)
- when we waited for the old mdmon to exit, we didn't look
for the socket in the right place
- when we failed to find a pid file, we returned the wrong
value (code expected <0, but got ==0).
Signed-off-by: Luca Berra <bluca@comedia.it>
Signed-off-by: NeilBrown <neilb@suse.de>
- pos = sprintf(path, "%s/", VAR_RUN);
+ pos = sprintf(path, "%s/", pid_dir);
if (is_subarray(devname)) {
devname++;
c = strchr(devname, '/');
if (is_subarray(devname)) {
devname++;
c = strchr(devname, '/');
fd = open(path, O_RDONLY | O_NOATIME, 0);
if (fd < 0)
fd = open(path, O_RDONLY | O_NOATIME, 0);
if (fd < 0)
n = read(fd, pid, 9);
close(fd);
if (n <= 0)
n = read(fd, pid, 9);
close(fd);
if (n <= 0)