mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdaemon: daemonise to daemonize
Replace daemonise() with daemonize().
This commit is contained in:
parent
b8a4fda0f7
commit
625c55fd6c
@ -323,7 +323,7 @@ static void _remove_lockfile(const char *file)
|
|||||||
perror("unlink failed");
|
perror("unlink failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _daemonise(daemon_state s)
|
static void _daemonize(daemon_state s)
|
||||||
{
|
{
|
||||||
int child_status;
|
int child_status;
|
||||||
int fd;
|
int fd;
|
||||||
@ -582,7 +582,7 @@ void daemon_start(daemon_state s)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!s.foreground)
|
if (!s.foreground)
|
||||||
_daemonise(s);
|
_daemonize(s);
|
||||||
|
|
||||||
s.log = &_log;
|
s.log = &_log;
|
||||||
s.log->name = s.name;
|
s.log->name = s.name;
|
||||||
|
@ -624,7 +624,7 @@ check_unlinked:
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _daemonise(struct filemap_monitor *fm)
|
static int _daemonize(struct filemap_monitor *fm)
|
||||||
{
|
{
|
||||||
pid_t pid = 0;
|
pid_t pid = 0;
|
||||||
int fd, ffd;
|
int fd, ffd;
|
||||||
@ -825,7 +825,7 @@ int main(int argc, char **argv)
|
|||||||
"mode=%s, path=\"%s\"", fm.fd, fm.group_id,
|
"mode=%s, path=\"%s\"", fm.fd, fm.group_id,
|
||||||
_mode_names[fm.mode], fm.path);
|
_mode_names[fm.mode], fm.path);
|
||||||
|
|
||||||
if (!_foreground && !_daemonise(&fm)) {
|
if (!_foreground && !_daemonize(&fm)) {
|
||||||
free(fm.path);
|
free(fm.path);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user