Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25475
b: refs/heads/master
c: d84a19c
h: refs/heads/master
i:
  25473: 6b60f46
  25471: 7f3839e
v: v3
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Apr 11, 2006
1 parent bd51225 commit f1c445f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1c332c9e813cbee6ca77c3a66ee4d312eb96770
refs/heads/master: d84a19ce52a7b01dc7318ea3a8223dfe44cccb6f
15 changes: 10 additions & 5 deletions trunk/arch/um/os-Linux/umid.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ static int not_dead_yet(char *dir)

dead = 0;
fd = open(file, O_RDONLY);
if(fd < 0){
if(fd < 0) {
fd = -errno;
if(fd != -ENOENT){
printk("not_dead_yet : couldn't open pid file '%s', "
"err = %d\n", file, -fd);
Expand All @@ -130,9 +131,13 @@ static int not_dead_yet(char *dir)

err = 0;
n = read(fd, pid, sizeof(pid));
if(n <= 0){
if(n < 0){
printk("not_dead_yet : couldn't read pid file '%s', "
"err = %d\n", file, errno);
goto out_close;
} else if(n == 0){
printk("not_dead_yet : couldn't read pid file '%s', "
"err = %d\n", file, -n);
"0-byte read\n", file);
goto out_close;
}

Expand All @@ -155,9 +160,9 @@ static int not_dead_yet(char *dir)

return err;

out_close:
out_close:
close(fd);
out:
out:
return 0;
}

Expand Down

0 comments on commit f1c445f

Please sign in to comment.