--- trunk/DBI.pm 2004/10/02 15:29:02 21 +++ trunk/DBI.pm 2004/10/02 16:54:42 23 @@ -24,11 +24,11 @@ use Fuse::DBI; Fuse::DBI->mount( ... ); -See L below for examples how to set parametars. +See C below for examples how to set parametars. =head1 DESCRIPTION -This module will use L module, part of C +This module will use C module, part of C available at L to mount your database as file system. @@ -85,12 +85,13 @@ $ctime_start = time(); + my $pid; if ($arg->{'fork'}) { - my $pid = fork(); + $pid = fork(); die "fork() failed: $!" unless defined $pid; # child will return to caller if ($pid) { - $self ? return $self : return undef; + return $self; } } @@ -103,7 +104,7 @@ $self->read_filenames; - my $mount = Fuse::main( + Fuse::main( mountpoint=>$arg->{'mount'}, getattr=>\&e_getattr, getdir=>\&e_getdir, @@ -117,10 +118,10 @@ debug=>0, ); - if (! $mount) { - warn "mount on ",$arg->{'mount'}," failed!\n"; - return undef; - } + exit(0) if ($arg->{'fork'}); + + return 1; + }; =head2 umount