2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 04:48:16 +00:00
criu/test/inhfd/pipe.py
Andrei Vagin 212e4c771a test: make zdtm.py python2/python3 compatible
Cc: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-06-08 09:54:22 +03:00

12 lines
217 B
Python
Executable File

import os
def create_fds():
(fd1, fd2) = os.pipe()
return (os.fdopen(fd2, "wb"), os.fdopen(fd1, "rb"))
def filename(pipef):
return 'pipe:[%d]' % os.fstat(pipef.fileno()).st_ino
def dump_opts(sockf):
return [ ]