mirror of
https://github.com/troglobit/finit.git
synced 2026-11-11 16:40:48 +00: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:
1 parent
6507136bdd
commit
50668161ad
4 files changed
+8
-8
No files matched your search
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user