Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def open(self, inode, flags, ctx):
path = self._get_node(inode).make_path(self.separator)
l.debug("open: %r", path)
file_handle = next(self._file_generator)
proc = await trio.open_process(self.argv_prefix + [path.decode()],
stdout=subprocess.PIPE,
stdin=subprocess.PIPE)
self._proc_map[file_handle] = proc
return pyfuse3.FileInfo(fh=file_handle, direct_io=True,
keep_cache=False, nonseekable=True)