use Getopt::Long qw(Configure);
use ID3FS::DB;
use ID3FS::Fuse;
+use POSIX;
+
use vars qw($me);
$me=($0=~/(?:.*\/)?(.*)/)[0];
exit unless($db);
my $fuse=ID3FS::Fuse->new($db, $source, $mountpoint, $verbose, $tagdepth);
+
+# disassociate from terminal
+unless($verbose)
+{
+ my $pid=fork();
+ if(defined($pid))
+ {
+ exit if($pid); # parent
+ POSIX::setsid(); # child
+ }
+ else
+ {
+ print "$me: couldn't drop terminal: $!\n";
+ }
+}
+
$fuse->run();
sub usage