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:
Joachim Nilsson
2017-01-13 07:55:44 +01:00
parent 6507136bdd
commit 50668161ad
4 changed files with 8 additions and 8 deletions
-7
View File
@@ -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;
-1
View File
@@ -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);
+7
View File
@@ -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
+1
View File
@@ -27,6 +27,7 @@
extern char *prognm;
char *progname(char *arg0);
void do_sleep(unsigned int sec);
#endif /* FINIT_UTIL_H_ */