# Use ikiwiki's function to create the file, this makes sure needed
# subdirs are there and does some sanity checking.
# Use ikiwiki's function to create the file, this makes sure needed
# subdirs are there and does some sanity checking.
writefile($dest, $config{destdir}, "");
# Run dot to create the graphic and get the map data.
my $pid;
writefile($dest, $config{destdir}, "");
# Run dot to create the graphic and get the map data.
my $pid;
$SIG{PIPE}=sub { $sigpipe=1 };
$pid=open2(*IN, *OUT, "dot -Tpng -o '$config{destdir}/$dest' -Tcmapx");
$SIG{PIPE}=sub { $sigpipe=1 };
$pid=open2(*IN, *OUT, "dot -Tpng -o '$config{destdir}/$dest' -Tcmapx");