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 committed 2017-01-13 07:55:44 +01:00
1 parent 6507136bdd
commit 50668161ad
4 files changed
+8 -8

No files matched your search

-7
View File
@@ -248,13 +248,6 @@ int getgroup(char *group)
#endif #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) void set_hostname(char **hostname)
{ {
FILE *fp; FILE *fp;
-1
View File
@@ -63,7 +63,6 @@ int print_result (int fail);
void logit (int prio, const char *fmt, ...); void logit (int prio, const char *fmt, ...);
int start_process (char *cmd, char *args[], int console); int start_process (char *cmd, char *args[], int console);
void do_sleep (unsigned int sec);
int getuser (char *username, char **home); int getuser (char *username, char **home);
int getgroup (char *group); int getgroup (char *group);
void set_hostname (char **hostname); void set_hostname (char **hostname);
+7
View File
@@ -36,6 +36,13 @@ char *progname(char *arg0)
return prognm; return prognm;
} }
void do_sleep(unsigned int sec)
{
while ((sec = sleep(sec)))
;
}
/** /**
* Local Variables: * Local Variables:
* indent-tabs-mode: t * indent-tabs-mode: t
+1
View File
@@ -27,6 +27,7 @@
extern char *prognm; extern char *prognm;
char *progname(char *arg0); char *progname(char *arg0);
void do_sleep(unsigned int sec);
#endif /* FINIT_UTIL_H_ */ #endif /* FINIT_UTIL_H_ */