shithub: rc

ref: a5d881764e2f96d0fba934a023e0565282a5af9a
dir: /bin/midipipe/

View raw version
#!/bin/rc
fn cleanup{
	rm -f /srv/midi
}
fn sigint{
	cleanup
	exit
}
fn sigexit{
	cleanup
}

rfork n
rm -f /srv/midi
bind -a '#|' /mnt/midi
<>[3]/mnt/midi/data1 {
	echo 3 >/srv/midi
	cat $* >/mnt/midi/data
}