summaryrefslogtreecommitdiff
path: root/subplot
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-02-19 20:19:15 +0200
committerLars Wirzenius <liw@liw.fi>2021-02-19 20:19:15 +0200
commitff17410cbee1492a5ca87869f76a2dafb7f90430 (patch)
tree0266517f6efc8027c5c58c7634de5e7176ee1a64 /subplot
parent248e5ab7518746c0ac43747040290e9b5d138028 (diff)
downloadobnam2-ff17410cbee1492a5ca87869f76a2dafb7f90430.tar.gz
feat: backup and restore named pipes (FIFOs)
Diffstat (limited to 'subplot')
-rw-r--r--subplot/data.py4
-rw-r--r--subplot/data.yaml3
2 files changed, 7 insertions, 0 deletions
diff --git a/subplot/data.py b/subplot/data.py
index 3c369d1..0c1a4a5 100644
--- a/subplot/data.py
+++ b/subplot/data.py
@@ -24,6 +24,10 @@ def create_unix_socket(ctx, filename=None):
fd.bind(filename)
+def create_fifo(ctx, filename=None):
+ os.mkfifo(filename)
+
+
def create_nonutf8_filename(ctx, dirname=None):
filename = "\x88"
os.mkdir(dirname)
diff --git a/subplot/data.yaml b/subplot/data.yaml
index 97e6eed..0e13abd 100644
--- a/subplot/data.yaml
+++ b/subplot/data.yaml
@@ -7,6 +7,9 @@
- given: "a Unix socket {filename}"
function: create_unix_socket
+- given: "a named pipe {filename}"
+ function: create_fifo
+
- given: "a file in {dirname} with a non-UTF8 filename"
function: create_nonutf8_filename