~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build fix for linux
[disorder]
/
server
/
trackdb.c
diff --git
a/server/trackdb.c
b/server/trackdb.c
index
59f755f
..
8cfd71f
100644
(file)
--- a/
server/trackdb.c
+++ b/
server/trackdb.c
@@
-157,22
+157,12
@@
static int reap_db_deadlock(ev_source attribute((unused)) *ev,
static pid_t subprogram(ev_source *ev, const char *prog,
int outputfd) {
pid_t pid;
static pid_t subprogram(ev_source *ev, const char *prog,
int outputfd) {
pid_t pid;
- int lfd;
/* If we're in the background then trap subprocess stdout/stderr */
/* If we're in the background then trap subprocess stdout/stderr */
- if(!isatty(2))
- lfd = logfd(ev, prog);
- else
- lfd = -1;
if(!(pid = xfork())) {
exitfn = _exit;
ev_signal_atfork(ev);
signal(SIGPIPE, SIG_DFL);
if(!(pid = xfork())) {
exitfn = _exit;
ev_signal_atfork(ev);
signal(SIGPIPE, SIG_DFL);
- if(lfd != -1) {
- xdup2(lfd, 1);
- xdup2(lfd, 2);
- xclose(lfd);
- }
if(outputfd != -1) {
xdup2(outputfd, 1);
xclose(outputfd);
if(outputfd != -1) {
xdup2(outputfd, 1);
xclose(outputfd);
@@
-182,10
+172,10
@@
static pid_t subprogram(ev_source *ev, const char *prog,
setpriority(PRIO_PROCESS, 0, 0);
execlp(prog, prog, "--config", configfile,
debugging ? "--debug" : "--no-debug",
setpriority(PRIO_PROCESS, 0, 0);
execlp(prog, prog, "--config", configfile,
debugging ? "--debug" : "--no-debug",
+ log_default == &log_syslog ? "--syslog" : "--no-syslog",
(char *)0);
fatal(errno, "error invoking %s", prog);
}
(char *)0);
fatal(errno, "error invoking %s", prog);
}
- if(lfd != -1) xclose(lfd);
return pid;
}
return pid;
}
@@
-1024,7
+1014,6
@@
static int stats_finished(ev_source attribute((unused)) *ev,
static int stats_read(ev_source attribute((unused)) *ev,
ev_reader *reader,
static int stats_read(ev_source attribute((unused)) *ev,
ev_reader *reader,
- int attribute((unused)) fd,
void *ptr,
size_t bytes,
int eof,
void *ptr,
size_t bytes,
int eof,
@@
-1040,7
+1029,6
@@
static int stats_read(ev_source attribute((unused)) *ev,
}
static int stats_error(ev_source attribute((unused)) *ev,
}
static int stats_error(ev_source attribute((unused)) *ev,
- int attribute((unused)) fd,
int errno_value,
void *u) {
struct stats_details *const d = u;
int errno_value,
void *u) {
struct stats_details *const d = u;