[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 07/12: utils/mount: start translators with stderr closed
From: |
Samuel Thibault |
Subject: |
[hurd] 07/12: utils/mount: start translators with stderr closed |
Date: |
Tue, 23 Feb 2016 23:53:24 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 234568d0c683d35362a17dd44b76472c405fbd86
Author: Justus Winter <address@hidden>
Date: Mon Feb 22 19:18:05 2016 +0100
utils/mount: start translators with stderr closed
Apparently some users of 'mount' do not cope with any output being
generated from the spawned translator.
* utils/mount.c (do_mount): Start translators with stderr closed.
---
utils/mount.c | 33 ++++++++++++++++++++++++++++++---
1 file changed, 30 insertions(+), 3 deletions(-)
diff --git a/utils/mount.c b/utils/mount.c
index c5736ba..5fa35bc 100644
--- a/utils/mount.c
+++ b/utils/mount.c
@@ -420,9 +420,36 @@ do_mount (struct fs *fs, int remount)
}
explain ("settrans -a");
- err = fshelp_start_translator (open_node, NULL, fsopts,
- fsopts, fsopts_len, timeout,
- &active_control);
+ {
+ mach_port_t ports[INIT_PORT_MAX];
+ mach_port_t fds[STDERR_FILENO + 1];
+ int ints[INIT_INT_MAX];
+ int i;
+
+ for (i = 0; i < INIT_PORT_MAX; i++)
+ ports[i] = MACH_PORT_NULL;
+ for (i = 0; i < STDERR_FILENO + 1; i++)
+ fds[i] = MACH_PORT_NULL;
+ memset (ints, 0, INIT_INT_MAX * sizeof(int));
+
+ ports[INIT_PORT_CWDIR] = getcwdir ();
+ ports[INIT_PORT_CRDIR] = getcrdir ();
+ ports[INIT_PORT_AUTH] = getauth ();
+
+ err = fshelp_start_translator_long (open_node, NULL,
+ fsopts, fsopts, fsopts_len,
+ fds, MACH_MSG_TYPE_COPY_SEND,
+ STDERR_FILENO + 1,
+ ports, MACH_MSG_TYPE_COPY_SEND,
+ INIT_PORT_MAX,
+ ints, INIT_INT_MAX,
+ geteuid (),
+ timeout, &active_control);
+ for (i = 0; i < INIT_PORT_MAX; i++)
+ mach_port_deallocate (mach_task_self (), ports[i]);
+ for (i = 0; i <= STDERR_FILENO; i++)
+ mach_port_deallocate (mach_task_self (), fds[i]);
+ }
/* If ERR is due to a problem opening the translated node, we print
that name, otherwise, the name of the translator. */
if (open_err)
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (ffaff64 -> 3294609), Samuel Thibault, 2016/02/23
- [hurd] 06/12: trans/crash: fix suspending task, Samuel Thibault, 2016/02/23
- [hurd] 07/12: utils/mount: start translators with stderr closed,
Samuel Thibault <=
- [hurd] 09/12: procfs: adapt to kernel interface change, Samuel Thibault, 2016/02/23
- [hurd] 04/12: Make fakeroot forward send errors instead of crashing, Samuel Thibault, 2016/02/23
- [hurd] 12/12: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd into upstream, Samuel Thibault, 2016/02/23
- [hurd] 08/12: fix Xioctl-proto.defs creation, Samuel Thibault, 2016/02/23
- [hurd] 10/12: Merge branch 'master' of git.savannah.gnu.org:/srv/git/hurd/hurd into upstream, Samuel Thibault, 2016/02/23
- [hurd] 11/12: libports: preserve the complex message flag, Samuel Thibault, 2016/02/23
- [hurd] 03/12: libnetfs: remove unused fields., Samuel Thibault, 2016/02/23
- [hurd] 05/12: nfs: fix deallocation of struct node., Samuel Thibault, 2016/02/23
- [hurd] 02/12: libdiskfs: fix and improve locking in nrefs/nput., Samuel Thibault, 2016/02/23
- [hurd] 01/12: nfs: Use libihash for the node cache., Samuel Thibault, 2016/02/23