projects
/
Fuse-DBI
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed fork option and tests
[Fuse-DBI]
/
DBI.pm
diff --git
a/DBI.pm
b/DBI.pm
index
8caecd3
..
c7942d5
100755
(executable)
--- a/
DBI.pm
+++ b/
DBI.pm
@@
-85,12
+85,13
@@
sub mount {
$ctime_start = time();
$ctime_start = time();
+ my $pid;
if ($arg->{'fork'}) {
if ($arg->{'fork'}) {
-
my
$pid = fork();
+ $pid = fork();
die "fork() failed: $!" unless defined $pid;
# child will return to caller
if ($pid) {
die "fork() failed: $!" unless defined $pid;
# child will return to caller
if ($pid) {
-
$self ? return $self : return unde
f;
+
return $sel
f;
}
}
}
}
@@
-103,7
+104,7
@@
sub mount {
$self->read_filenames;
$self->read_filenames;
-
my $mount =
Fuse::main(
+ Fuse::main(
mountpoint=>$arg->{'mount'},
getattr=>\&e_getattr,
getdir=>\&e_getdir,
mountpoint=>$arg->{'mount'},
getattr=>\&e_getattr,
getdir=>\&e_getdir,
@@
-117,10
+118,10
@@
sub mount {
debug=>0,
);
debug=>0,
);
- if (! $mount) {
- warn "mount on ",$arg->{'mount'}," failed!\n";
-
return undef
;
- }
+ exit(0) if ($arg->{'fork'});
+
+
return 1
;
+
};
=head2 umount
};
=head2 umount