From: Philipp Hagemeister Date: Sun, 31 Aug 2014 23:41:25 +0000 (+0200) Subject: [utils] Use flock instead of lockf (Fixes #3621) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=2582bebe06cf06cd2bdce9ada7764fccc3730ef4;p=youtube-dl [utils] Use flock instead of lockf (Fixes #3621) --- diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 8a36e619a..6fe057234 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1141,10 +1141,10 @@ else: import fcntl def _lock_file(f, exclusive): - fcntl.lockf(f, fcntl.LOCK_EX if exclusive else fcntl.LOCK_SH) + fcntl.flock(f, fcntl.LOCK_EX if exclusive else fcntl.LOCK_SH) def _unlock_file(f): - fcntl.lockf(f, fcntl.LOCK_UN) + fcntl.flock(f, fcntl.LOCK_UN) class locked_file(object):