From: Jianxin Xiong Date: Thu, 27 Sep 2012 16:49:05 +0000 (-0700) Subject: Give error message when fail to open the lock file. X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=e04be33a8d12f6e8b8c0e17ecb6a75705986890c;p=~ardavis%2Fdapl.git Give error message when fail to open the lock file. --- diff --git a/dapl/svc/mpxyd.c b/dapl/svc/mpxyd.c index ee966bb..172af1a 100644 --- a/dapl/svc/mpxyd.c +++ b/dapl/svc/mpxyd.c @@ -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; }