[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r32441 - in gnunet/src: core fs gns hostlist include nat st
From: |
gnunet |
Subject: |
[GNUnet-SVN] r32441 - in gnunet/src: core fs gns hostlist include nat statistics testbed testing transport util |
Date: |
Thu, 20 Feb 2014 11:35:33 +0100 |
Author: harsha
Date: 2014-02-20 11:35:33 +0100 (Thu, 20 Feb 2014)
New Revision: 32441
Modified:
gnunet/src/core/test_core_api.c
gnunet/src/core/test_core_api_reliability.c
gnunet/src/core/test_core_api_start_only.c
gnunet/src/core/test_core_quota_compliance.c
gnunet/src/fs/gnunet-auto-share.c
gnunet/src/gns/gnunet-gns-import.c
gnunet/src/gns/test_gns_proxy.c
gnunet/src/hostlist/test_gnunet_daemon_hostlist.c
gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c
gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
gnunet/src/include/gnunet_os_lib.h
gnunet/src/nat/nat.c
gnunet/src/nat/nat_mini.c
gnunet/src/nat/test_nat_test.c
gnunet/src/statistics/test_statistics_api.c
gnunet/src/statistics/test_statistics_api_loop.c
gnunet/src/statistics/test_statistics_api_watch.c
gnunet/src/statistics/test_statistics_api_watch_zero_value.c
gnunet/src/testbed/gnunet-helper-testbed.c
gnunet/src/testbed/gnunet_mpi_test.c
gnunet/src/testbed/gnunet_testbed_mpi_spawn.c
gnunet/src/testbed/testbed_api_hosts.c
gnunet/src/testing/testing.c
gnunet/src/transport/gnunet-transport-certificate-creation.c
gnunet/src/transport/gnunet-transport.c
gnunet/src/transport/plugin_transport_http_server.c
gnunet/src/util/gnunet-uri.c
gnunet/src/util/helper.c
gnunet/src/util/os_priority.c
gnunet/src/util/test_common_logging_runtime_loglevels.c
gnunet/src/util/test_os_start_process.c
gnunet/src/util/test_resolver_api.c
Log:
Allow redirection of STDERR when starting processes.
Modified: gnunet/src/core/test_core_api.c
===================================================================
--- gnunet/src/core/test_core_api.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/core/test_core_api.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -301,7 +301,7 @@
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- NULL, NULL,
+ NULL, NULL, NULL,
binary,
"gnunet-service-arm",
"-c", cfgname, NULL);
Modified: gnunet/src/core/test_core_api_reliability.c
===================================================================
--- gnunet/src/core/test_core_api_reliability.c 2014-02-20 07:07:30 UTC (rev
32440)
+++ gnunet/src/core/test_core_api_reliability.c 2014-02-20 10:35:33 UTC (rev
32441)
@@ -419,9 +419,11 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, binary,
- "gnunet-service-arm",
- "-c", cfgname, NULL);
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ binary,
+ "gnunet-service-arm",
+ "-c", cfgname, NULL);
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
p->th = GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, NULL, NULL);
GNUNET_assert (p->th != NULL);
Modified: gnunet/src/core/test_core_api_start_only.c
===================================================================
--- gnunet/src/core/test_core_api_start_only.c 2014-02-20 07:07:30 UTC (rev
32440)
+++ gnunet/src/core/test_core_api_start_only.c 2014-02-20 10:35:33 UTC (rev
32441)
@@ -134,7 +134,7 @@
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- NULL, NULL,
+ NULL, NULL, NULL,
binary,
"gnunet-service-arm",
"-c", cfgname, NULL);
Modified: gnunet/src/core/test_core_quota_compliance.c
===================================================================
--- gnunet/src/core/test_core_quota_compliance.c 2014-02-20 07:07:30 UTC
(rev 32440)
+++ gnunet/src/core/test_core_quota_compliance.c 2014-02-20 10:35:33 UTC
(rev 32441)
@@ -571,9 +571,11 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, binary,
- "gnunet-service-arm",
- "-c", cfgname, NULL);
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ binary,
+ "gnunet-service-arm",
+ "-c", cfgname, NULL);
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
p->stats = GNUNET_STATISTICS_create ("core", p->cfg);
GNUNET_assert (p->stats != NULL);
Modified: gnunet/src/fs/gnunet-auto-share.c
===================================================================
--- gnunet/src/fs/gnunet-auto-share.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/fs/gnunet-auto-share.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -488,7 +488,7 @@
_("Publishing `%s'\n"),
wi->filename);
publish_proc = GNUNET_OS_start_process_vap (GNUNET_YES,
- 0, NULL, NULL,
+ 0, NULL, NULL, NULL,
"gnunet-publish",
argv);
if (NULL == publish_proc)
Modified: gnunet/src/gns/gnunet-gns-import.c
===================================================================
--- gnunet/src/gns/gnunet-gns-import.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/gns/gnunet-gns-import.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -129,8 +129,11 @@
va_end (apc2);
if (arglen > 0)
argp[-1] = '\0';
- p = GNUNET_OS_start_process_va (pipe_control, std_inheritance, pipe_stdin,
- pipe_stdout, filename, ap);
+ p = GNUNET_OS_start_process_va (pipe_control, std_inheritance,
+ pipe_stdin,
+ pipe_stdout,
+ NULL,
+ filename, ap);
va_end (ap);
if (NULL == p)
{
Modified: gnunet/src/gns/test_gns_proxy.c
===================================================================
--- gnunet/src/gns/test_gns_proxy.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/gns/test_gns_proxy.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -401,6 +401,7 @@
GNUNET_OS_INHERIT_STD_ALL,
NULL,
NULL,
+ NULL,
"gnunet-gns-proxy",
"gnunet-gns-proxy",
"-c", tmp_cfgfile, NULL);
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist.c 2014-02-20 07:07:30 UTC
(rev 32440)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist.c 2014-02-20 10:35:33 UTC
(rev 32441)
@@ -135,9 +135,11 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, binary,
- "gnunet-service-arm",
- "-c", cfgname, NULL);
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ binary,
+ "gnunet-service-arm",
+ "-c", cfgname, NULL);
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
p->th =
GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, ¬ify_connect, NULL);
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c 2014-02-20
07:07:30 UTC (rev 32440)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_learning.c 2014-02-20
10:35:33 UTC (rev 32441)
@@ -385,9 +385,11 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, binary,
- "gnunet-service-arm",
- "-c", cfgname, NULL);
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ binary,
+ "gnunet-service-arm",
+ "-c", cfgname, NULL);
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
if (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_string (p->cfg, "HOSTLIST",
"HOSTLISTFILE",
@@ -420,7 +422,9 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, binary,
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ binary,
"gnunet-service-arm",
"-c", cfgname, NULL);
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
Modified: gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c
===================================================================
--- gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c 2014-02-20
07:07:30 UTC (rev 32440)
+++ gnunet/src/hostlist/test_gnunet_daemon_hostlist_reconnect.c 2014-02-20
10:35:33 UTC (rev 32441)
@@ -135,9 +135,11 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-arm");
p->cfg = GNUNET_CONFIGURATION_create ();
p->arm_proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, binary,
- "gnunet-service-arm",
- "-c", cfgname, NULL);
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ binary,
+ "gnunet-service-arm",
+ "-c", cfgname, NULL);
GNUNET_assert (GNUNET_OK == GNUNET_CONFIGURATION_load (p->cfg, cfgname));
p->th =
GNUNET_TRANSPORT_connect (p->cfg, NULL, p, NULL, ¬ify_connect, NULL);
Modified: gnunet/src/include/gnunet_os_lib.h
===================================================================
--- gnunet/src/include/gnunet_os_lib.h 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/include/gnunet_os_lib.h 2014-02-20 10:35:33 UTC (rev 32441)
@@ -310,6 +310,7 @@
* @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
* @param pipe_stdin pipe to use to send input to child process (or NULL)
* @param pipe_stdout pipe to use to get output from child process (or NULL)
+ * @param pipe_stderr pipe to use to get error output from child process (or
NULL)
* @param filename name of the binary
* @param argv NULL-terminated array of arguments to the process
* @return pointer to process structure of the new process, NULL on error
@@ -319,6 +320,7 @@
enum GNUNET_OS_InheritStdioFlags std_inheritance,
struct GNUNET_DISK_PipeHandle *pipe_stdin,
struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ struct GNUNET_DISK_PipeHandle *pipe_stderr,
const char *filename,
char *const argv[]);
@@ -330,6 +332,7 @@
* @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
* @param pipe_stdin pipe to use to send input to child process (or NULL)
* @param pipe_stdout pipe to use to get output from child process (or NULL)
+ * @param pipe_stderr pipe to use to get error output from child process (or
NULL)
* @param filename name of the binary
* @param ... NULL-terminated list of arguments to the process
* @return pointer to process structure of the new process, NULL on error
@@ -339,6 +342,7 @@
enum GNUNET_OS_InheritStdioFlags std_inheritance,
struct GNUNET_DISK_PipeHandle *pipe_stdin,
struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ struct GNUNET_DISK_PipeHandle *pipe_stderr,
const char *filename, ...);
@@ -349,6 +353,7 @@
* @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
* @param pipe_stdin pipe to use to send input to child process (or NULL)
* @param pipe_stdout pipe to use to get output from child process (or NULL)
+ * @param pipe_stderr pipe to use to get error output from child process (or
NULL)
* @param filename name of the binary
* @param va NULL-terminated list of arguments to the process
* @return pointer to process structure of the new process, NULL on error
@@ -358,6 +363,7 @@
enum GNUNET_OS_InheritStdioFlags std_inheritance,
struct GNUNET_DISK_PipeHandle *pipe_stdin,
struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ struct GNUNET_DISK_PipeHandle *pipe_stderr,
const char *filename, va_list va);
/**
Modified: gnunet/src/nat/nat.c
===================================================================
--- gnunet/src/nat/nat.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/nat/nat.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -907,7 +907,7 @@
/* Start the server process */
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-nat-server");
h->server_proc =
- GNUNET_OS_start_process (GNUNET_NO, 0, NULL, h->server_stdout,
+ GNUNET_OS_start_process (GNUNET_NO, 0, NULL, h->server_stdout, NULL,
binary,
"gnunet-helper-nat-server",
h->internal_address, NULL);
@@ -1445,7 +1445,7 @@
(unsigned int) h->adv_port);
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-nat-client");
proc =
- GNUNET_OS_start_process (GNUNET_NO, 0, NULL, NULL,
+ GNUNET_OS_start_process (GNUNET_NO, 0, NULL, NULL, NULL,
binary,
"gnunet-helper-nat-client",
h->internal_address,
Modified: gnunet/src/nat/nat_mini.c
===================================================================
--- gnunet/src/nat/nat_mini.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/nat/nat_mini.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -213,8 +213,8 @@
return eh;
}
eh->eip =
- GNUNET_OS_start_process (GNUNET_NO, 0, NULL, eh->opipe,
- "external-ip", "external-ip",
+ GNUNET_OS_start_process (GNUNET_NO, 0, NULL, eh->opipe, NULL,
+ "external-ip", "external-ip",
NULL);
if (NULL == eh->eip)
{
Modified: gnunet/src/nat/test_nat_test.c
===================================================================
--- gnunet/src/nat/test_nat_test.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/nat/test_nat_test.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -107,8 +107,9 @@
gns = GNUNET_OS_start_process (GNUNET_YES,
GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- NULL, NULL, "gnunet-nat-server",
+ NULL, NULL, NULL,
"gnunet-nat-server",
+ "gnunet-nat-server",
"-c", "test_nat_test_data.conf",
"12345", NULL);
GNUNET_assert (NULL != gns);
Modified: gnunet/src/statistics/test_statistics_api.c
===================================================================
--- gnunet/src/statistics/test_statistics_api.c 2014-02-20 07:07:30 UTC (rev
32440)
+++ gnunet/src/statistics/test_statistics_api.c 2014-02-20 10:35:33 UTC (rev
32441)
@@ -146,7 +146,8 @@
NULL);
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics");
proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL,
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
binary,
"gnunet-service-statistics",
"-c", "test_statistics_api_data.conf", NULL);
@@ -169,7 +170,8 @@
ok = 1;
/* restart to check persistence! */
proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL,
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
binary,
"gnunet-service-statistics",
"-c", "test_statistics_api_data.conf", NULL);
Modified: gnunet/src/statistics/test_statistics_api_loop.c
===================================================================
--- gnunet/src/statistics/test_statistics_api_loop.c 2014-02-20 07:07:30 UTC
(rev 32440)
+++ gnunet/src/statistics/test_statistics_api_loop.c 2014-02-20 10:35:33 UTC
(rev 32441)
@@ -94,7 +94,7 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics");
proc =
GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- NULL, NULL,
+ NULL, NULL, NULL,
binary,
"gnunet-service-statistics",
"-c", "test_statistics_api_data.conf", NULL);
Modified: gnunet/src/statistics/test_statistics_api_watch.c
===================================================================
--- gnunet/src/statistics/test_statistics_api_watch.c 2014-02-20 07:07:30 UTC
(rev 32440)
+++ gnunet/src/statistics/test_statistics_api_watch.c 2014-02-20 10:35:33 UTC
(rev 32441)
@@ -122,7 +122,8 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics");
proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL,
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
binary,
"gnunet-service-statistics",
"-c", "test_statistics_api_data.conf", NULL);
Modified: gnunet/src/statistics/test_statistics_api_watch_zero_value.c
===================================================================
--- gnunet/src/statistics/test_statistics_api_watch_zero_value.c
2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/statistics/test_statistics_api_watch_zero_value.c
2014-02-20 10:35:33 UTC (rev 32441)
@@ -157,7 +157,8 @@
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-statistics");
proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL,
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
binary,
"gnunet-service-statistics",
"-c", "test_statistics_api_data.conf", NULL);
Modified: gnunet/src/testbed/gnunet-helper-testbed.c
===================================================================
--- gnunet/src/testbed/gnunet-helper-testbed.c 2014-02-20 07:07:30 UTC (rev
32440)
+++ gnunet/src/testbed/gnunet-helper-testbed.c 2014-02-20 10:35:33 UTC (rev
32441)
@@ -461,8 +461,9 @@
}
testbed =
GNUNET_OS_start_process (PIPE_CONTROL,
- GNUNET_OS_INHERIT_STD_ERR /*verbose? */ , NULL,
- NULL, binary, "gnunet-service-testbed", "-c",
+ GNUNET_OS_INHERIT_STD_ERR /*verbose? */ ,
+ NULL, NULL, NULL,
+ binary, "gnunet-service-testbed", "-c",
config, NULL);
GNUNET_free (binary);
GNUNET_free (config);
Modified: gnunet/src/testbed/gnunet_mpi_test.c
===================================================================
--- gnunet/src/testbed/gnunet_mpi_test.c 2014-02-20 07:07:30 UTC (rev
32440)
+++ gnunet/src/testbed/gnunet_mpi_test.c 2014-02-20 10:35:33 UTC (rev
32441)
@@ -70,7 +70,7 @@
argv2[cnt - 1] = argv[cnt];
proc =
GNUNET_OS_start_process_vap (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL,
- NULL, argv2[0], argv2);
+ NULL, NULL, argv2[0], argv2);
if (NULL == proc)
{
printf ("Cannot exec\n");
Modified: gnunet/src/testbed/gnunet_testbed_mpi_spawn.c
===================================================================
--- gnunet/src/testbed/gnunet_testbed_mpi_spawn.c 2014-02-20 07:07:30 UTC
(rev 32440)
+++ gnunet/src/testbed/gnunet_testbed_mpi_spawn.c 2014-02-20 10:35:33 UTC
(rev 32441)
@@ -246,7 +246,7 @@
/* Spawn the new process here */
LOG (GNUNET_ERROR_TYPE_INFO, _("Spawning process `%s'\n"), argv2[0]);
child = GNUNET_OS_start_process_vap (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL,
NULL,
- NULL,
+ NULL, NULL,
argv2[0], argv2);
if (NULL == child)
{
Modified: gnunet/src/testbed/testbed_api_hosts.c
===================================================================
--- gnunet/src/testbed/testbed_api_hosts.c 2014-02-20 07:07:30 UTC (rev
32440)
+++ gnunet/src/testbed/testbed_api_hosts.c 2014-02-20 10:35:33 UTC (rev
32441)
@@ -1349,7 +1349,7 @@
free_argv (rsh_args);
h->auxp =
GNUNET_OS_start_process_vap (GNUNET_NO, GNUNET_OS_INHERIT_STD_ERR, NULL,
- NULL, h->helper_argv[0], h->helper_argv);
+ NULL, NULL, h->helper_argv[0],
h->helper_argv);
if (NULL == h->auxp)
{
GNUNET_break (0); /* Cannot exec SSH? */
Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/testing/testing.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -491,7 +491,7 @@
GNUNET_free (binary);
i->proc = GNUNET_OS_start_process (PIPE_CONTROL,
GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- NULL, NULL,
+ NULL, NULL, NULL,
libexec_binary,
libexec_binary,
"-c",
Modified: gnunet/src/transport/gnunet-transport-certificate-creation.c
===================================================================
--- gnunet/src/transport/gnunet-transport-certificate-creation.c
2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/transport/gnunet-transport-certificate-creation.c
2014-02-20 10:35:33 UTC (rev 32441)
@@ -94,7 +94,9 @@
/* Create RSA Private Key */
/* openssl genrsa -out $1 1024 2> /dev/null */
openssl =
- GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, "openssl", "openssl", "genrsa",
+ GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ "openssl", "openssl", "genrsa",
"-out", argv[1], "1024", NULL);
if (NULL == openssl)
{
@@ -108,7 +110,9 @@
/* Create a self-signed certificate in batch mode using rsa key */
/* openssl req -batch -days 365 -out $2 -new -x509 -key $1 2> /dev/null */
openssl =
- GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL, "openssl", "openssl", "req",
+ GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ "openssl", "openssl", "req",
"-batch", "-days", "365", "-out", argv[2],
"-new", "-x509", "-key", argv[1], NULL);
if (NULL == openssl)
Modified: gnunet/src/transport/gnunet-transport.c
===================================================================
--- gnunet/src/transport/gnunet-transport.c 2014-02-20 07:07:30 UTC (rev
32440)
+++ gnunet/src/transport/gnunet-transport.c 2014-02-20 10:35:33 UTC (rev
32441)
@@ -665,8 +665,10 @@
{
binary = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver");
resolver = GNUNET_OS_start_process (GNUNET_YES,
- GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, binary,
- "gnunet-service-resolver", NULL );
+ GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
+ binary,
+ "gnunet-service-resolver", NULL );
GNUNET_free(binary);
}
resolver_users++;
Modified: gnunet/src/transport/plugin_transport_http_server.c
===================================================================
--- gnunet/src/transport/plugin_transport_http_server.c 2014-02-20 07:07:30 UTC
(rev 32440)
+++ gnunet/src/transport/plugin_transport_http_server.c 2014-02-20 10:35:33 UTC
(rev 32441)
@@ -1946,7 +1946,8 @@
"No usable TLS certificate found, creating certificate\n");
errno = 0;
cert_creation =
- GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
NULL, NULL,
+ GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, NULL, NULL,
"gnunet-transport-certificate-creation",
"gnunet-transport-certificate-creation",
key_file, cert_file, NULL);
Modified: gnunet/src/util/gnunet-uri.c
===================================================================
--- gnunet/src/util/gnunet-uri.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/util/gnunet-uri.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -113,7 +113,7 @@
GNUNET_DISK_PIPE_END_READ),
&maint_child_death, NULL);
p = GNUNET_OS_start_process (GNUNET_NO, 0,
- NULL, NULL,
+ NULL, NULL, NULL,
program,
program,
args[0],
Modified: gnunet/src/util/helper.c
===================================================================
--- gnunet/src/util/helper.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/util/helper.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -426,7 +426,7 @@
GNUNET_DISK_pipe_handle (h->helper_in, GNUNET_DISK_PIPE_END_WRITE);
h->helper_proc =
GNUNET_OS_start_process_vap (h->with_control_pipe,
GNUNET_OS_INHERIT_STD_ERR,
- h->helper_in, h->helper_out,
+ h->helper_in, h->helper_out, NULL,
h->binary_name,
h->binary_argv);
if (NULL == h->helper_proc)
Modified: gnunet/src/util/os_priority.c
===================================================================
--- gnunet/src/util/os_priority.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/util/os_priority.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -503,6 +503,7 @@
enum GNUNET_OS_InheritStdioFlags std_inheritance,
struct GNUNET_DISK_PipeHandle *pipe_stdin,
struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ struct GNUNET_DISK_PipeHandle *pipe_stderr,
const SOCKTYPE *lsocks,
const char *filename,
char *const argv[])
@@ -523,6 +524,8 @@
unsigned int ls;
int fd_stdout_write;
int fd_stdout_read;
+ int fd_stderr_write;
+ int fd_stderr_read;
int fd_stdin_read;
int fd_stdin_write;
@@ -583,6 +586,19 @@
(pipe_stdin,
GNUNET_DISK_PIPE_END_WRITE),
&fd_stdin_write, sizeof
(int)));
}
+ if (NULL != pipe_stderr)
+ {
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle
+ (pipe_stderr,
+
GNUNET_DISK_PIPE_END_READ),
+ &fd_stderr_read, sizeof
(int)));
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle
+ (pipe_stderr,
+
GNUNET_DISK_PIPE_END_WRITE),
+ &fd_stderr_write, sizeof
(int)));
+ }
lscp = NULL;
ls = 0;
if (NULL != lsocks)
@@ -659,8 +675,15 @@
GNUNET_break (0 == close (1));
open_dev_null (1, O_WRONLY);
}
- if (0 == (std_inheritance & GNUNET_OS_INHERIT_STD_ERR))
+ if (NULL != pipe_stderr)
{
+ GNUNET_break (0 == close (fd_stderr_read));
+ if (-1 == dup2 (fd_stderr_write, 2))
+ LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "dup2");
+ GNUNET_break (0 == close (fd_stderr_write));
+ }
+ else if (0 == (std_inheritance & GNUNET_OS_INHERIT_STD_ERR))
+ {
GNUNET_break (0 == close (2));
open_dev_null (2, O_WRONLY);
}
@@ -1220,6 +1243,7 @@
enum GNUNET_OS_InheritStdioFlags std_inheritance,
struct GNUNET_DISK_PipeHandle *pipe_stdin,
struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ struct GNUNET_DISK_PipeHandle *pipe_stderr,
const char *filename,
char *const argv[])
{
@@ -1227,6 +1251,7 @@
std_inheritance,
pipe_stdin,
pipe_stdout,
+ pipe_stderr,
NULL,
filename,
argv);
@@ -1249,6 +1274,7 @@
enum GNUNET_OS_InheritStdioFlags std_inheritance,
struct GNUNET_DISK_PipeHandle *pipe_stdin,
struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ struct GNUNET_DISK_PipeHandle *pipe_stderr,
const char *filename, va_list va)
{
struct GNUNET_OS_Process *ret;
@@ -1271,6 +1297,7 @@
std_inheritance,
pipe_stdin,
pipe_stdout,
+ pipe_stderr,
filename,
argv);
GNUNET_free (argv);
@@ -1294,14 +1321,20 @@
enum GNUNET_OS_InheritStdioFlags std_inheritance,
struct GNUNET_DISK_PipeHandle *pipe_stdin,
struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ struct GNUNET_DISK_PipeHandle *pipe_stderr,
const char *filename, ...)
{
struct GNUNET_OS_Process *ret;
va_list ap;
va_start (ap, filename);
- ret = GNUNET_OS_start_process_va (pipe_control, std_inheritance, pipe_stdin,
- pipe_stdout, filename, ap);
+ ret = GNUNET_OS_start_process_va (pipe_control,
+ std_inheritance,
+ pipe_stdin,
+ pipe_stdout,
+ pipe_stderr,
+ filename,
+ ap);
va_end (ap);
return ret;
}
@@ -1332,6 +1365,7 @@
std_inheritance,
NULL,
NULL,
+ NULL,
lsocks,
filename,
argv);
@@ -1776,7 +1810,7 @@
return NULL;
va_start (ap, binary);
/* redirect stdout, don't inherit stderr/stdin */
- eip = GNUNET_OS_start_process_va (GNUNET_NO, 0, NULL, opipe, binary, ap);
+ eip = GNUNET_OS_start_process_va (GNUNET_NO, 0, NULL, opipe, NULL, binary,
ap);
va_end (ap);
if (NULL == eip)
{
Modified: gnunet/src/util/test_common_logging_runtime_loglevels.c
===================================================================
--- gnunet/src/util/test_common_logging_runtime_loglevels.c 2014-02-20
07:07:30 UTC (rev 32440)
+++ gnunet/src/util/test_common_logging_runtime_loglevels.c 2014-02-20
10:35:33 UTC (rev 32441)
@@ -391,7 +391,8 @@
break;
}
- proc = GNUNET_OS_start_process (GNUNET_NO,
GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, pipe_stdout,
+ proc = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
+ NULL, pipe_stdout, NULL,
#if MINGW
"test_common_logging_dummy",
#else
Modified: gnunet/src/util/test_os_start_process.c
===================================================================
--- gnunet/src/util/test_os_start_process.c 2014-02-20 07:07:30 UTC (rev
32440)
+++ gnunet/src/util/test_os_start_process.c 2014-02-20 10:35:33 UTC (rev
32441)
@@ -135,7 +135,8 @@
proc =
GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ERR,
- hello_pipe_stdin, hello_pipe_stdout, fn,
+ hello_pipe_stdin, hello_pipe_stdout, NULL,
+ fn,
"test_gnunet_echo_hello", "-", NULL);
GNUNET_free (fn);
@@ -203,7 +204,9 @@
}
fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver");
proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR,
hello_pipe_stdin, hello_pipe_stdout, fn,
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR,
+ hello_pipe_stdin, hello_pipe_stdout, NULL,
+ fn,
"gnunet-service-resolver", "-", NULL);
sleep (1); /* give process time to start, so we actually use the pipe-kill
mechanism! */
GNUNET_free (fn);
@@ -234,7 +237,9 @@
}
fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver");
proc =
- GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR,
hello_pipe_stdin, hello_pipe_stdout, fn,
+ GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_ERR,
+ hello_pipe_stdin, hello_pipe_stdout, NULL,
+ fn,
"gnunet-service-resolver", "-", NULL);
if (0 != GNUNET_OS_process_kill (proc, GNUNET_TERM_SIG))
{
Modified: gnunet/src/util/test_resolver_api.c
===================================================================
--- gnunet/src/util/test_resolver_api.c 2014-02-20 07:07:30 UTC (rev 32440)
+++ gnunet/src/util/test_resolver_api.c 2014-02-20 10:35:33 UTC (rev 32441)
@@ -367,7 +367,8 @@
fn = GNUNET_OS_get_libexec_binary_path ("gnunet-service-resolver");
proc = GNUNET_OS_start_process (GNUNET_YES,
GNUNET_OS_INHERIT_STD_OUT_AND_ERR,
- NULL, NULL, fn,
+ NULL, NULL, NULL,
+ fn,
"gnunet-service-resolver",
"-c", "test_resolver_api_data.conf", NULL);
GNUNET_assert (NULL != proc);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r32441 - in gnunet/src: core fs gns hostlist include nat statistics testbed testing transport util,
gnunet <=