diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-07-09 19:04:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-07-09 19:04:19 +0000 |
commit | 8f9464256fc06a884bf589b4004262a0549d11b3 (patch) | |
tree | a088b8acbebdefe2acf0b41cfed4418830275b78 /src/nat | |
parent | 817ee37a75fb8eb5887023d1a5152cb528ee2d5a (diff) | |
download | gnunet-8f9464256fc06a884bf589b4004262a0549d11b3.tar.gz gnunet-8f9464256fc06a884bf589b4004262a0549d11b3.zip |
-LRN: Another take on std descriptor inheritance
Now descriptors are not inherited by default, you have to pass
a set of flags to make it so. When pipes are given, flags have
no effect.
gnunet-arm now has two options to block stdout and stderr from being
passed to gnunet-service-arm
Diffstat (limited to 'src/nat')
-rw-r--r-- | src/nat/nat.c | 6 | ||||
-rw-r--r-- | src/nat/nat_mini.c | 2 | ||||
-rw-r--r-- | src/nat/test_nat_test.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/nat/nat.c b/src/nat/nat.c index 79604da7d..80d0fc2bd 100644 --- a/src/nat/nat.c +++ b/src/nat/nat.c | |||
@@ -835,7 +835,7 @@ start_gnunet_nat_server (struct GNUNET_NAT_Handle *h) | |||
835 | "gnunet-helper-nat-server", h->internal_address); | 835 | "gnunet-helper-nat-server", h->internal_address); |
836 | /* Start the server process */ | 836 | /* Start the server process */ |
837 | h->server_proc = | 837 | h->server_proc = |
838 | GNUNET_OS_start_process (GNUNET_NO, NULL, h->server_stdout, | 838 | GNUNET_OS_start_process (GNUNET_NO, 0, NULL, h->server_stdout, |
839 | "gnunet-helper-nat-server", | 839 | "gnunet-helper-nat-server", |
840 | "gnunet-helper-nat-server", | 840 | "gnunet-helper-nat-server", |
841 | h->internal_address, NULL); | 841 | h->internal_address, NULL); |
@@ -1332,8 +1332,8 @@ GNUNET_NAT_run_client (struct GNUNET_NAT_Handle *h, | |||
1332 | _("Running gnunet-helper-nat-client %s %s %u\n"), h->internal_address, | 1332 | _("Running gnunet-helper-nat-client %s %s %u\n"), h->internal_address, |
1333 | inet4, (unsigned int) h->adv_port); | 1333 | inet4, (unsigned int) h->adv_port); |
1334 | proc = | 1334 | proc = |
1335 | GNUNET_OS_start_process (GNUNET_NO, | 1335 | GNUNET_OS_start_process (GNUNET_NO, 0, NULL, NULL, |
1336 | NULL, NULL, "gnunet-helper-nat-client", | 1336 | "gnunet-helper-nat-client", |
1337 | "gnunet-helper-nat-client", h->internal_address, | 1337 | "gnunet-helper-nat-client", h->internal_address, |
1338 | inet4, port_as_string, NULL); | 1338 | inet4, port_as_string, NULL); |
1339 | if (NULL == proc) | 1339 | if (NULL == proc) |
diff --git a/src/nat/nat_mini.c b/src/nat/nat_mini.c index 82697a971..5dffa8120 100644 --- a/src/nat/nat_mini.c +++ b/src/nat/nat_mini.c | |||
@@ -176,7 +176,7 @@ GNUNET_NAT_mini_get_external_ipv4 (struct GNUNET_TIME_Relative timeout, | |||
176 | return NULL; | 176 | return NULL; |
177 | } | 177 | } |
178 | eh->eip = | 178 | eh->eip = |
179 | GNUNET_OS_start_process (GNUNET_NO, NULL, eh->opipe, "external-ip", "external-ip", | 179 | GNUNET_OS_start_process (GNUNET_NO, 0, NULL, eh->opipe, "external-ip", "external-ip", |
180 | NULL); | 180 | NULL); |
181 | if (NULL == eh->eip) | 181 | if (NULL == eh->eip) |
182 | { | 182 | { |
diff --git a/src/nat/test_nat_test.c b/src/nat/test_nat_test.c index 891a7633a..c213ffa1e 100644 --- a/src/nat/test_nat_test.c +++ b/src/nat/test_nat_test.c | |||
@@ -102,7 +102,7 @@ main (int argc, char *const argv[]) | |||
102 | } | 102 | } |
103 | 103 | ||
104 | gns = | 104 | gns = |
105 | GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-nat-server", | 105 | GNUNET_OS_start_process (GNUNET_YES, GNUNET_OS_INHERIT_STD_OUT_AND_ERR, NULL, NULL, "gnunet-nat-server", |
106 | "gnunet-nat-server", | 106 | "gnunet-nat-server", |
107 | "-c", "test_nat_test_data.conf", "12345", NULL); | 107 | "-c", "test_nat_test_data.conf", "12345", NULL); |
108 | GNUNET_assert (NULL != gns); | 108 | GNUNET_assert (NULL != gns); |