85 |
|
|
86 |
$ctime_start = time(); |
$ctime_start = time(); |
87 |
|
|
88 |
|
my $pid; |
89 |
if ($arg->{'fork'}) { |
if ($arg->{'fork'}) { |
90 |
my $pid = fork(); |
$pid = fork(); |
91 |
die "fork() failed: $!" unless defined $pid; |
die "fork() failed: $!" unless defined $pid; |
92 |
# child will return to caller |
# child will return to caller |
93 |
if ($pid) { |
if ($pid) { |
94 |
$self ? return $self : return undef; |
return $self; |
95 |
} |
} |
96 |
} |
} |
97 |
|
|
104 |
|
|
105 |
$self->read_filenames; |
$self->read_filenames; |
106 |
|
|
107 |
my $mount = Fuse::main( |
Fuse::main( |
108 |
mountpoint=>$arg->{'mount'}, |
mountpoint=>$arg->{'mount'}, |
109 |
getattr=>\&e_getattr, |
getattr=>\&e_getattr, |
110 |
getdir=>\&e_getdir, |
getdir=>\&e_getdir, |
118 |
debug=>0, |
debug=>0, |
119 |
); |
); |
120 |
|
|
121 |
if (! $mount) { |
exit(0) if ($arg->{'fork'}); |
122 |
warn "mount on ",$arg->{'mount'}," failed!\n"; |
|
123 |
return undef; |
return 1; |
124 |
} |
|
125 |
}; |
}; |
126 |
|
|
127 |
=head2 umount |
=head2 umount |