mirror of
https://github.com/troglobit/finit.git
synced 2026-10-10 16:52:39 +07:00
Move do_sleep() from helper.c --> util.c
This move makes it possible to share the code between the Finit daemon and its client tools. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -248,13 +248,6 @@ int getgroup(char *group)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Signal safe sleep ... we get a lot of SIGCHLD at reboot */
|
||||
void do_sleep(unsigned int sec)
|
||||
{
|
||||
while ((sec = sleep(sec)))
|
||||
;
|
||||
}
|
||||
|
||||
void set_hostname(char **hostname)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
@@ -63,7 +63,6 @@ int print_result (int fail);
|
||||
void logit (int prio, const char *fmt, ...);
|
||||
|
||||
int start_process (char *cmd, char *args[], int console);
|
||||
void do_sleep (unsigned int sec);
|
||||
int getuser (char *username, char **home);
|
||||
int getgroup (char *group);
|
||||
void set_hostname (char **hostname);
|
||||
|
||||
@@ -36,6 +36,13 @@ char *progname(char *arg0)
|
||||
return prognm;
|
||||
}
|
||||
|
||||
void do_sleep(unsigned int sec)
|
||||
{
|
||||
while ((sec = sleep(sec)))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Local Variables:
|
||||
* indent-tabs-mode: t
|
||||
|
||||
Reference in New Issue
Block a user