doc tweaks
[id3fs.git] / sbin / id3fsd
index 0809985..90b8739 100755 (executable)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-use lib '/home/ianb/projects/id3fs/id3fs/lib';
+use lib '/home/ianb/projects/id3fs/id3fs/lib'; # FIXME: remove
 use strict;
 use Getopt::Long qw(Configure);
 use ID3FS::DB;
 use ID3FS::Fuse;
+use POSIX;
+
 use vars qw($me);
 $me=($0=~/(?:.*\/)?(.*)/)[0];
 
@@ -48,6 +50,22 @@ my $db=ID3FS::DB->new($me, $verbose, 0, $source, $dbpath);
 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
@@ -160,6 +178,10 @@ Example paths:
   /krautrock/AND/year/1971/NOARTIST/unknown-track.mp3
   /krautrock/AND/year/1971/TRACKS/01-Paperhouse.mp3
 
+id3fs supports OR, AND and NOT. NOT has the highest precedence,
+followed by AND, so F<foo/OR/NOT/bar/AND/baz> is parsed as
+(foo OR ((NOT bar) AND baz)).
+
 =head2 Tags
 
 Tags are extracted from the B<genre> tag of audio files with