Make global lockfile actually work
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1485 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -60,10 +60,12 @@ otp_db_open (void) | ||||
|       close(lock); | ||||
|       break; | ||||
|     } | ||||
|     if (time(NULL) - statbuf.st_mtime > OTP_DB_TIMEOUT) | ||||
|       unlink (OTP_DB_LOCK); | ||||
|     else | ||||
|       sleep (1); | ||||
|     if (stat (OTP_DB_LOCK, &statbuf) == 0) { | ||||
|       if (time(NULL) - statbuf.st_mtime > OTP_DB_TIMEOUT) | ||||
| 	unlink (OTP_DB_LOCK); | ||||
|       else | ||||
| 	sleep (1); | ||||
|     } | ||||
|   } | ||||
|   if (i == RETRIES) | ||||
|     return NULL; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Assar Westerlund
					Assar Westerlund