if (io_fds[IOFD_TIMING].v == NULL)
log_error(USE_ERRNO, "Can't create %s", pathbuf);
- io_fds[IOFD_TTYIN].v = open_io_fd(pathbuf, len, "/ttyin", def_compress_io);
- if (io_fds[IOFD_TTYIN].v == NULL)
- log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ if (def_log_input) {
+ io_fds[IOFD_TTYIN].v = open_io_fd(pathbuf, len, "/ttyin", def_compress_io);
+ if (io_fds[IOFD_TTYIN].v == NULL)
+ log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ }
- io_fds[IOFD_TTYOUT].v = open_io_fd(pathbuf, len, "/ttyout", def_compress_io);
- if (io_fds[IOFD_TTYOUT].v == NULL)
- log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ if (def_log_output) {
+ io_fds[IOFD_TTYOUT].v = open_io_fd(pathbuf, len, "/ttyout", def_compress_io);
+ if (io_fds[IOFD_TTYOUT].v == NULL)
+ log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ }
- io_fds[IOFD_STDIN].v = open_io_fd(pathbuf, len, "/stdin", def_compress_io);
- if (io_fds[IOFD_STDIN].v == NULL)
- log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ if (def_log_input) {
+ io_fds[IOFD_STDIN].v = open_io_fd(pathbuf, len, "/stdin", def_compress_io);
+ if (io_fds[IOFD_STDIN].v == NULL)
+ log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ }
- io_fds[IOFD_STDOUT].v = open_io_fd(pathbuf, len, "/stdout", def_compress_io);
- if (io_fds[IOFD_STDOUT].v == NULL)
- log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ if (def_log_output) {
+ io_fds[IOFD_STDOUT].v = open_io_fd(pathbuf, len, "/stdout", def_compress_io);
+ if (io_fds[IOFD_STDOUT].v == NULL)
+ log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ }
- io_fds[IOFD_STDERR].v = open_io_fd(pathbuf, len, "/stderr", def_compress_io);
- if (io_fds[IOFD_STDERR].v == NULL)
- log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ if (def_log_output) {
+ io_fds[IOFD_STDERR].v = open_io_fd(pathbuf, len, "/stderr", def_compress_io);
+ if (io_fds[IOFD_STDERR].v == NULL)
+ log_error(USE_ERRNO, "Can't create %s", pathbuf);
+ }
/* So we can block tty-generated signals */
sigemptyset(&ttyblock);
const char *buf;
unsigned int len;
{
+ if (!io_fds[IOFD_TTYIN].v)
+ return TRUE;
return log_io(buf, len, IOFD_TTYIN);
}
const char *buf;
unsigned int len;
{
+ if (!io_fds[IOFD_TTYOUT].v)
+ return TRUE;
return log_io(buf, len, IOFD_TTYOUT);
}
const char *buf;
unsigned int len;
{
+ if (!io_fds[IOFD_STDIN].v)
+ return TRUE;
return log_io(buf, len, IOFD_STDIN);
}
const char *buf;
unsigned int len;
{
+ if (!io_fds[IOFD_STDOUT].v)
+ return TRUE;
return log_io(buf, len, IOFD_STDOUT);
}
const char *buf;
unsigned int len;
{
+ if (!io_fds[IOFD_STDOUT].v)
+ return TRUE;
return log_io(buf, len, IOFD_STDERR);
}