sd_is_fifo() did fstat on the file descriptor twice instead of stating
the supplied path.
---
 src/sd-daemon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/sd-daemon.c b/src/sd-daemon.c
index cb568b5..5df70e3 100644
--- a/src/sd-daemon.c
+++ b/src/sd-daemon.c
@@ -141,7 +141,7 @@ int sd_is_fifo(int fd, const char *path) {
                 struct stat st_path;
 
                 memset(&st_path, 0, sizeof(st_path));
-                if (fstat(fd, &st_path) < 0) {
+                if (stat(path, &st_path) < 0) {
 
                         if (errno == ENOENT || errno == ENOTDIR)
                                 return 0;
-- 
1.6.0.4

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to