diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index 0b28b0926f..e25a112d32 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -2011,7 +2011,11 @@ def __enter__(self): self.f.close() raise if 'w' in self.mode: - self.f.truncate() + try: + self.f.truncate() + except OSError as e: + if e.errno != 29: # Illegal seek, expected when self.f is a FIFO + raise e return self def unlock(self):