mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Finally extract the log library and make it build.
This patch:
- introduces an fdio module for low-level fd functions that don't
need to log.
- moves the responsibility for opening files outside of torlog.c,
so it won't need to call tor_open_cloexec.
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
/* Copyright (c) 2013-2018, The Tor Project, Inc. */
|
||||
/* See LICENSE for licensing information */
|
||||
|
||||
#define CONFIG_PRIVATE
|
||||
|
||||
#include "orconfig.h"
|
||||
#include "or/or.h"
|
||||
#include "or/config.h"
|
||||
#include "lib/err/torerr.h"
|
||||
#include "lib/log/torlog.h"
|
||||
#include "test/test.h"
|
||||
@@ -90,7 +93,7 @@ test_sigsafe_err(void *arg)
|
||||
|
||||
init_logging(1);
|
||||
mark_logs_temp();
|
||||
add_file_log(&include_bug, fn, 0);
|
||||
open_and_add_file_log(&include_bug, fn, 0);
|
||||
tor_log_update_sigsafe_err_fds();
|
||||
close_temp_logs();
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "common/util_process.h"
|
||||
#include "test/log_test_helpers.h"
|
||||
#include "lib/compress/compress_zstd.h"
|
||||
#include "lib/fdio/fdio.h"
|
||||
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
|
||||
Reference in New Issue
Block a user