[buildd-tools-devel] Bug#584831: schroot: please add an option to avoid fork()
Timo Lindfors
lindi at kurp.hut.fi
Sun Jun 6 22:45:47 UTC 2010
Source: schroot
Version: 1.4.2-1
Severity: wishlist
Some background info: I was trying to help a friend get his new laptop
work with debian lenny:
When I tried to trick gdm into running Xorg from an unstable chroot I
noticed X would just die with "Caught signal terminated" right after
startup. However, the following wrapper worked:
#include <unistd.h>
int main(int argc, char **argv) {
chroot("/versions/sid");
chdir("/versions/sid");
execlp ("/usr/bin/X", "/usr/bin/X", ":0", "-audit", "0","-auth", "/var/lib/gdm/:0.Xauth", "-nolisten", "tcp", "vt7", NULL);
return 0;
}
It seems that gdm does not tolerate it if the "command=" in gdm.conf
forks. By avoiding fork with
diff --git a/sbuild/sbuild-session.cc b/sbuild/sbuild-session.cc
index 220a4fa..ec9f863 100644
--- a/sbuild/sbuild-session.cc
+++ b/sbuild/sbuild-session.cc
@@ -1292,6 +1292,9 @@ session::run_chroot (sbuild::chroot::ptr& session_chroot)
assert(!session_chroot->get_name().empty());
pid_t pid;
+
+ run_child(session_chroot);
+
if ((pid = fork()) == -1)
{
throw error(CHILD_FORK, strerror(errno));
I was able to make gdm happy. Could you please consider adding this
behind some --no-fork option? I would imaging that it is not very
uncommon to need to run a newer X server and one of the easiest ways
to do that is to run it from an unstable chroot. (Backports don't even
have a bug tracking system but insist on a mailing list last time I
checked).
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=fi_FI (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages schroot depends on:
ii libboost-filesystem1.42.0 1.42.0-3 filesystem operations (portable pa
ii libboost-program-options1.42. 1.42.0-3 program options library for C++
ii libboost-regex1.42.0 1.42.0-3 regular expression library for C++
ii libboost-system1.42.0 1.42.0-3 Operating system (e.g. diagnostics
ii libc6 2.11.1-2 Embedded GNU C Library: Shared lib
ii libgcc1 1:4.4.4-4 GCC support library
ii liblockdev1 1.0.3-1.4 Run-time shared library for lockin
ii libpam0g 1.1.1-3 Pluggable Authentication Modules l
ii libstdc++6 4.4.4-4 The GNU Standard C++ Library v3
ii libuuid1 2.17.2-2 Universally Unique ID library
ii schroot-common 1.4.2-1 common files for schroot
schroot recommends no packages.
Versions of packages schroot suggests:
pn aufs-modules | unionfs-module <none> (no description available)
ii debootstrap 1.0.23 Bootstrap a basic Debian system
pn lvm2 <none> (no description available)
ii unzip 6.0-4 De-archiver for .zip files
-- no debconf information
More information about the Buildd-tools-devel
mailing list