projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
We don't need a separate module here.
[apps/pfixtools.git]
/
common.c
diff --git
a/common.c
b/common.c
index
d3147ff
..
186ac43
100644
(file)
--- a/
common.c
+++ b/
common.c
@@
-159,6
+159,20
@@
int accept_nonblock(int fd)
return sock;
}
return sock;
}
+int xwrite(int fd, const char *s, size_t l)
+{
+ while (l > 0) {
+ int nb = write(fd, s, l);
+ if (nb < 0) {
+ if (errno == EINTR || errno == EAGAIN)
+ continue;
+ return -1;
+ }
+ l -= nb;
+ }
+ return 0;
+}
+
int daemon_detach(void)
{
pid_t pid;
int daemon_detach(void)
{
pid_t pid;