Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 21 lines (18 sloc) 0.38 kb
#!/usr/bin/perl
use strict;
# fimpc.. using fifos to control mpd using mpc. PoC.
sub readFifo {
my $FIFO = shift;
while(1) {
unless(-p $FIFO) {
unlink $FIFO;
system('mknod', $FIFO, 'p');
}
open(FIFOR, "< $FIFO") or die "Cannot read $FIFO: $!\n";
while(<FIFOR>) {
my $cmd = $_;
system("mpc $cmd");
}
}
}
&readFifo('/tmp/tompc');
Jump to Line
Something went wrong with that request. Please try again.