]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
Give error message when fail to open the lock file.
authorJianxin Xiong <jianxin.xiong@intel.com>
Thu, 27 Sep 2012 16:49:05 +0000 (09:49 -0700)
committerJianxin Xiong <jianxin.xiong@intel.com>
Thu, 27 Sep 2012 16:49:05 +0000 (09:49 -0700)
dapl/svc/mpxyd.c

index ee966bb2db604620a6f9e56b7508ed12a6dda4d1..172af1a7de8288187cae22e5a7b70585e2b797ec 100644 (file)
@@ -539,10 +539,13 @@ static int mpxy_open_lock_file(void)
        char pid[16];
 
        lock_fd = open(lock_file, O_RDWR | O_CREAT | O_EXCL, 0640);
-       if (lock_fd < 0)
+       if (lock_fd < 0) {
+               perror(lock_file);
                return lock_fd;
+       }
 
        if (lockf(lock_fd, F_TLOCK, 0)) {
+               perror(lock_file);
                close(lock_fd);
                return -1;
        }