Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix EOFError when execute targetcli commands concurrently
1.fcntl.LOCK_UN means unlock, but save file must own the exclusive lock. So, we must use fcntl.LOCK_EX(acquire an exclusive lock) flag in here. 2.Then, fcntl.lockf is different from fcntl.flock: a)fcntl.flock perform the lock operation for the whole file b)fcntl.lockf perform the lock operation for the partial file c)see https://docs.python.org/2.7/library/fcntl.html for details I think we need to call fcntl.flock in here to avoid EOFError. Signed-off-by: Zou Mingzhe <[email protected]>
- Loading branch information