From 73e89dd7760b6f37be3b8a6d110d12633bbbf651 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 18 Feb 2021 10:25:16 +0200 Subject: feat: support named pipes (FIFOs) --- subplot/summain.py | 4 ++++ subplot/summain.yaml | 3 +++ 2 files changed, 7 insertions(+) (limited to 'subplot') diff --git a/subplot/summain.py b/subplot/summain.py index e137ade..ca7c0f6 100644 --- a/subplot/summain.py +++ b/subplot/summain.py @@ -28,6 +28,10 @@ def create_socket(ctx, filename=None): fd.bind(filename) +def create_fifo(ctx, filename=None): + os.mkfifo(filename) + + def set_mode(ctx, filename=None, mode=None): os.chmod(filename, int(mode, 8)) diff --git a/subplot/summain.yaml b/subplot/summain.yaml index 8df3642..8e5333c 100644 --- a/subplot/summain.yaml +++ b/subplot/summain.yaml @@ -7,6 +7,9 @@ - given: socket {filename} function: create_socket +- given: named pipe {filename} + function: create_fifo + - given: file {filename} function: create_file -- cgit v1.2.1