chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/configuration.c, lib/home.c: Introduce environment variables.
[disorder]
/
lib
/
logfd.c
diff --git
a/lib/logfd.c
b/lib/logfd.c
index 015321a3de93da0acfb5433bf532afff4cc5d3f3..71751088461a0c9163572f157aee340f2c8ff6c0 100644
(file)
--- a/
lib/logfd.c
+++ b/
lib/logfd.c
@@
-43,12
+43,12
@@
static int logfd_readable(ev_source attribute((unused)) *ev,
while((nl = memchr(ptr, '\n', bytes))) {
len = nl - (char *)ptr;
ev_reader_consume(reader, len + 1);
while((nl = memchr(ptr, '\n', bytes))) {
len = nl - (char *)ptr;
ev_reader_consume(reader, len + 1);
- info("%s: %.*s", tag, len, (char *)ptr);
+
disorder_
info("%s: %.*s", tag, len, (char *)ptr);
ptr = nl + 1;
bytes -= len + 1;
}
if(eof && bytes) {
ptr = nl + 1;
bytes -= len + 1;
}
if(eof && bytes) {
- info("%s: %.*s", tag, (int)bytes, (char *)ptr);
+
disorder_
info("%s: %.*s", tag, (int)bytes, (char *)ptr);
ev_reader_consume(reader, bytes);
}
return 0;
ev_reader_consume(reader, bytes);
}
return 0;
@@
-60,7
+60,7
@@
static int logfd_error(ev_source attribute((unused)) *ev,
void *u) {
const char *tag = u;
void *u) {
const char *tag = u;
- error(errno_value, "error reading log pipe from %s", tag);
+
disorder_
error(errno_value, "error reading log pipe from %s", tag);
return 0;
}
return 0;
}
@@
-74,7
+74,7
@@
static int logfd_error(ev_source attribute((unused)) *ev,
* it in the parent).
*
* Any lines written to this fd (i.e. by the subprocess) will be logged via
* it in the parent).
*
* Any lines written to this fd (i.e. by the subprocess) will be logged via
- * info(), with @p tag included.
+ *
disorder_
info(), with @p tag included.
*/
int logfd(ev_source *ev, const char *tag) {
int p[2];
*/
int logfd(ev_source *ev, const char *tag) {
int p[2];
@@
-84,7
+84,7
@@
int logfd(ev_source *ev, const char *tag) {
nonblock(p[0]);
if(!ev_reader_new(ev, p[0], logfd_readable, logfd_error, (void *)tag,
"logfd"))
nonblock(p[0]);
if(!ev_reader_new(ev, p[0], logfd_readable, logfd_error, (void *)tag,
"logfd"))
- fatal(errno, "error calling ev_reader_new");
+
disorder_
fatal(errno, "error calling ev_reader_new");
return p[1];
}
return p[1];
}