#!/usr/bin/env bash tmp=$(mktemp --tmpdir -d janitor-bash-example.XXXXX) mkfifo "$tmp/janitor" janitor < "$tmp/janitor" & echo "d$tmp" > "$tmp/janitor" tmpf=$(mktemp --tmpdir janitor-bash-example-f.XXXXX) echo "f$tmpf" > "$tmp/janitor" kill -KILL $$