[PATCH 11/16] mach-defpager: register mach-defpager translators as important

2013-08-05 Thread Justus Winter
Register any mach-defpager translators running as root as important processes at the proc server. * mach-defpager/main.c (main): Mark us as important. --- mach-defpager/main.c | 12 1 file changed, 12 insertions(+) diff --git a/mach-defpager/main.c b/mach-defpager/main.c index 313

[PATCH 10/16] libtrivfs: register libtrivfs-based translators as important

2013-08-05 Thread Justus Winter
Register libtrivfs-based translators running as root as important processes at the proc server. * libtrivfs/startup.c (trivfs_startup): Mark us as important. --- libtrivfs/startup.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/libtrivfs/startup.c b/libtrivfs/startup.

[PATCH 13/16] proc: keep track of {start,end}_code

2013-08-05 Thread Justus Winter
Any executable segments loaded from the ELF binary are in this range. * proc/proc.h (struct proc): Add {start,end}_code. * proc/mgt.h (S_proc_set_code): New function. * proc/mgt.h (S_proc_get_code): New function. --- proc/mgt.c | 39 +++ proc/proc.h |2 +

[PATCH 09/16] libnetfs: register libnetfs-based translators as important

2013-08-05 Thread Justus Winter
Register libnetfs-based translators running as root as important processes at the proc server. * libnetfs/init-startup.c (netfs_startup): Mark us as important. --- libnetfs/init-startup.c | 13 + 1 file changed, 13 insertions(+) diff --git a/libnetfs/init-startup.c b/libnetfs/init-

[PATCH 15/16] exec: keep track of the range where executable segments are mapped

2013-08-05 Thread Justus Winter
Keep track of the range where executable segments are mapped into memory and hand that information over to the proc server. * exec/priv.h (struct execdata): Add {start,end}_code. * exec/exec.c (prepare): Initialize {start,end}_code. (load_section): Update {start,end}_code. (do_exec): Use proc_set_

[PATCH] Make start_code and end_code available in /proc/*/stat

2013-08-05 Thread Justus Winter
This makes killall5 actually kill any processes not marked as important. * process.c (process_file_gc_stat): Fix {start,end}_code. --- process.c | 24 +++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/process.c b/process.c index c5ef7d8..269a18b 100644 --- a

umount.patch update

2013-08-14 Thread Justus Winter
Hi, this is a drop-in replacement for the umount.patch currently shipped with the Debian hurd package. I've implemented the '-d' switch that is used in Debians shutdown procedure. I also fixed minor stylistic issues and the formatting. Justus

[PATCH] umount: add a umount utility

2013-08-14 Thread Justus Winter
, Inc. + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of the GNU Hurd. + + The GNU Hurd is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundat

[PATCH 01/17] hurd: add missing routines in process_reply.defs

2013-08-15 Thread Justus Winter
Add the appropriate simpleroutine or skip directives to hurd/process_reply.defs matching the ones in hurd/process.defs. * hurd/process_reply.defs: Add missing routine declarations. --- hurd/process_reply.defs | 114 +++ 1 file changed, 114 insertions(+

Make sysvinit pid 1, fix killall5 (2)

2013-08-15 Thread Justus Winter
Hi, This is an updated patch series fixing all sysvinit related issues. [PATCH 04/17] daemons: fix setsid(2) in console-run Pid 1 is already the group leader, using setsid(2) again fails. [PATCH 09/17] libdiskfs: register libdiskfs-based translators as [PATCH 10/17] libnetfs: register libnetfs-

[PATCH 02/17] Define and use symbolic names for important processes

2013-08-15 Thread Justus Winter
/pids.h b/include/pids.h new file mode 100644 index 000..485916b --- /dev/null +++ b/include/pids.h @@ -0,0 +1,29 @@ +/* List of special processes. + + Copyright (C) 2013 Free Software Foundation + Written by Justus Winter <4win...@informatik.uni-hamburg.de> + + This file is part of t

[PATCH 04/17] daemons: fix setsid(2) in console-run

2013-08-15 Thread Justus Winter
Only run setsid(2) if the process is not already the group leader. * daemons/console-run.c (open_console): Fix setsid(2). --- daemons/console-run.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemons/console-run.c b/daemons/console-run.c index fb879e5..e1bfe64 1006

[PATCH 07/17] hurd: add proc_mark_important

2013-08-15 Thread Justus Winter
This is based on a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed, updated and the copyright year is adjusted properly. It has been complemented with the necessary features to address the issues the original

[PATCH 06/17] proc: add proc_mark_important server code

2013-08-15 Thread Justus Winter
This is based on a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed, updated and the copyright year is adjusted properly. It has been complemented with the necessary features to address the issues the original

[PATCH 03/17] Add proc_set_init_task, make runsystem pid 1

2013-08-15 Thread Justus Winter
* hurd/process.defs (proc_set_init_task): New procedure. * hurd/process_reply.defs (proc_set_init_task): Likewise. * hurd/process_request.defs (proc_set_init_task): Likewise. * include/pids.h: Add HURD_PID_INIT as 1, adjust others accordingly. * init/init.c (start_child): Register the child task. *

[PATCH 05/17] proc: make the function check_owner available

2013-08-15 Thread Justus Winter
Make the function check_owner available for use in other files. * proc/info.c (check_owner): Drop attributes static and inline. * proc/proc.h (check_owner): Add prototype. --- proc/info.c |2 +- proc/proc.h |1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/proc/info.c b/

[PATCH 08/17] init: Mark all of inits children and init itself as important

2013-08-15 Thread Justus Winter
This is based on a fragment of Guillem Jovers patch presented here: http://lists.gnu.org/archive/html/bug-hurd/2006-02/msg00081.html It has been refreshed, updated and the copyright year is adjusted properly. It has been complemented with the necessary features to address the issues the original

[PATCH 10/17] libnetfs: register libnetfs-based translators as important

2013-08-15 Thread Justus Winter
Register libnetfs-based translators running as root as important processes at the proc server. * libnetfs/init-startup.c (netfs_startup): Mark us as important. --- libnetfs/init-startup.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libnetfs/init-startup.c b/libnetfs/init

[PATCH 15/17] hurd: add proc_{get,set}_code

2013-08-15 Thread Justus Winter
Add routines to set and query the processes start_code and end_code locations. Any executable segments loaded from the ELF binary are in this range. * hurd/process.defs: Add proc_{get,set}_code. * hurd/process_reply.defs: Add proc_{get,set}_code. * hurd/process_request.defs: Add proc_{get,set}_cod

[PATCH 12/17] mach-defpager: register mach-defpager translators as important

2013-08-15 Thread Justus Winter
Register any mach-defpager translators running as root as important processes at the proc server. * mach-defpager/main.c (main): Mark us as important. --- mach-defpager/main.c | 13 + 1 file changed, 13 insertions(+) diff --git a/mach-defpager/main.c b/mach-defpager/main.c index 31

[PATCH 14/17] proc: keep track of {start,end}_code

2013-08-15 Thread Justus Winter
Any executable segments loaded from the ELF binary are in this range. * proc/proc.h (struct proc): Add {start,end}_code. * proc/mgt.h (S_proc_set_code): New function. * proc/mgt.h (S_proc_get_code): New function. --- proc/mgt.c | 39 +++ proc/proc.h |2 +

[PATCH 17/17] Build fixes: Build processUser.o and link against it

2013-08-15 Thread Justus Winter
The process interfaces got new routines, add processUser.o so that they get picked up by the servers that need them. As I understand it this is no longer necessary once the libc has been rebuilt with the new definitions. So this patch can either be omitted if the libc is rebuild first, or committe

[PATCH 11/17] libtrivfs: register libtrivfs-based translators as important

2013-08-15 Thread Justus Winter
Register libtrivfs-based translators running as root as important processes at the proc server. * libtrivfs/startup.c (trivfs_startup): Mark us as important. --- libtrivfs/startup.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/libtrivfs/startup.c b/libtrivfs/startup.

[PATCH 09/17] libdiskfs: register libdiskfs-based translators as important

2013-08-15 Thread Justus Winter
Register libdiskfs-based translators running as root as important processes at the proc server. * libdiskfs/init-startup.c (_diskfs_init_completed): Mark us as important. --- libdiskfs/init-startup.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/libdiskfs/init-startup.c b/libdiskf

[PATCH 16/17] exec: keep track of the range where executable segments are mapped

2013-08-15 Thread Justus Winter
Keep track of the range where executable segments are mapped into memory and hand that information over to the proc server. * exec/priv.h (struct execdata): Add {start,end}_code. * exec/exec.c (prepare): Initialize {start,end}_code. (load_section): Update {start,end}_code. (do_exec): Use proc_set_

[PATCH 13/17] trans: register symlink translators as important

2013-08-15 Thread Justus Winter
Register any symlink translators running as root as important processes at the proc server. * trans/symlink.c (main): Mark us as important. --- trans/symlink.c | 13 + 1 file changed, 13 insertions(+) diff --git a/trans/symlink.c b/trans/symlink.c index 03b5100..845a112 100644 ---

patches for sysvinit (2)

2013-08-15 Thread Justus Winter
Hi :) this is my updated patch series for the sysvinit package. Notable changes since the last series: * There are no dirty hacks anymore thanks to the recently send patch series for Hurd that makes sysvinit pid 1 and marks some processes as important and not to be killed by killall5. * The

[PATCH 3/7] initscripts: use pidof -s /sbin/init for robustness

2013-08-15 Thread Justus Winter
insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1ff8750..7d9aa05 100644 --- a/debian/changelog +++ b/debian/changelog @@ -53,6 +53,7 @@ sysvinit (2.88dsf-42) UNRELEASED; urgency=low [ Justus Winter ] * mount-functions.sh: Hurd has a tmpfs translator now

[PATCH 2/7] initscripts: add -ocompatible to procfs mounts on Hurd

2013-08-15 Thread Justus Winter
/changelog @@ -52,6 +52,7 @@ sysvinit (2.88dsf-42) UNRELEASED; urgency=low [ Justus Winter ] * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround. + * mount-functions.sh: Add -ocompatible to procfs mounts on Hurd. -- Roger Leigh Sat, 04 May 2013 13:13:51 +0100 diff

[PATCH 1/7] initscripts: hurd has a proper tmpfs now, remove workaround

2013-08-15 Thread Justus Winter
/changelog @@ -50,6 +50,9 @@ sysvinit (2.88dsf-42) UNRELEASED; urgency=low * Redirect error output from 'initctl version', suppressing warnings when upstart is installed but not running. Closes: #685779. + [ Justus Winter ] + * mount-functions.sh: Hurd has a tmpfs translator n

[PATCH 6/7] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS.

2013-08-15 Thread Justus Winter
If sysconf returns an error, fall back to MAXSYMLINKS on platforms that define it. Fixes build on Hurd. --- debian/changelog |2 ++ src/killall5.c | 15 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index ce16030..dd1861

[PATCH 4/7] initscripts: add runsystem.sysv

2013-08-15 Thread Justus Winter
runsystem.sysv does some very early initialization of Hurd and execs /sbin/init to start the system using sysvinit. Hurd uses the alternatives system to choose which runsystem to use and traditionally shipped a custom init solution. Add runsystem.sysv using update-alternatives in initscripts.postin

[PATCH 5/7] initscripts: Only run rootcheck on Linux

2013-08-15 Thread Justus Winter
Neither kFreeBSD nor Hurd have /dev/root and the device ids used here are specific to Linux. Note that fsck is still run, rootcheck refers to the check whether the root device in /etc/fstab matches the actual device. --- debian/changelog |2 ++ debian/src/initscri

[PATCH 7/7] sysvinit: Fix getty path in /etc/inittab on Hurd.

2013-08-15 Thread Justus Winter
This is essentially the same as 89f6476d8979174f395a1bf784486254464c349d but fixes the existing /etc/inittab file in the postinstall script. --- debian/changelog |1 + debian/sysvinit.config| 43 +++ debian/sysvinit.postinst | 13 ++

[PATCH 1/2] Hurd: make reboot() send messages to both pid 1 and 2

2013-08-15 Thread Justus Winter
(-) diff --git a/ChangeLog b/ChangeLog index fa588c9..0274da9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-08-08 Justus Winter <4win...@informatik.uni-hamburg.de> + + * sysdeps/mach/hurd/reboot.c (reboot): Try to send a + startup_reboot message to both pid 1

[PATCH 2/2] Define _PATH_MOUNTED as "/etc/mtab"

2013-08-15 Thread Justus Winter
Change the definition of _PATH_MOUNTED to "/etc/mtab". This is the value used on Linux. The change is motivated by the fact that on Debian /etc/mtab is a symbolic link to /proc/mounts. This patch adjusts the macro for non-linux systems such as Hurd. Changing this using sysdeps/mach/hurd/paths.h ca

Cleanups for the exec server

2013-08-15 Thread Justus Winter
Hi :) this is a series removing both functionality and unused (out-#ifdef-ed) code in an attempt to reduce the size and complexity of an essential server. Overall this cuts about 800 lines from exec/exec.c. It is meant to be applied over my recent patch series, but should be applicable to the van

[PATCH 3/5] exec: Remove #ifdef 0-out code doing nothing.

2013-08-15 Thread Justus Winter
exec/exec.c (load_section): Remove unused code. --- exec/exec.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/exec/exec.c b/exec/exec.c index 0d3ec69..48409c0 100644 --- a/exec/exec.c +++ b/exec/exec.c @@ -164,23 +164,7 @@ load_section (void *section, str

[PATCH 4/5] exec: Remove #ifdef 0-out code for user specified exec servers.

2013-08-15 Thread Justus Winter
This code was meant to allow the user to specify alternative exec servers using an environment variable. The Hurd uses the file system as namespace for server lookups, so the proper way to use one's own exec server seems to be the remap translator. * exec/exec.c (S_exec_exec): Remove unused code.

[PATCH 5/5] exec: remove the BFD code

2013-08-15 Thread Justus Winter
This commit removes the parts of the exec server that were once using the Binary File Descriptor library. As I understand it, the BFD code stopped working because it uses stdio streams and the glue code for that has never been ported to libio. The code has been #ifdefed out ever since. It may or m

[PATCH 2/3] Remove unused file alloc.h

2013-08-15 Thread Justus Winter
* alloc.h: Remove file. * Makefile (migcom_SOURCES): Remove alloc.h. --- Makefile.am |2 +- alloc.h | 34 -- 2 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 alloc.h diff --git a/Makefile.am b/Makefile.am index a28fa3e..484e183 100644

Cleanups for mig

2013-08-15 Thread Justus Winter
Hi, while waiting hours for package rebuilds, I looked at mig and started by doing some cleanups. I hope noone shows up with a VAX and gcc < 2.0 and complains about me pulling the plug on the custom alloca implementation ;) I'm reasonably sure I didn't break anything, I rebuilt the Hurd with this

[PATCH 3/3] Drop alloca.c

2013-08-15 Thread Justus Winter
This file was only used with GCC < 2, so it's time to drop it. * alloca.c: Remove file. * configure.ac: Remove test for alloca. * Makefile.am (migcom_LDADD): Remove @ALLOCA@. --- Makefile.am |2 +- alloca.c | 504 -- configure.ac |

[PATCH 1/3] Drop the register keyword

2013-08-15 Thread Justus Winter
Drop the register keyword both from MIGs code and from the generated code. The register keyword is only a hint and it is ignored by modern compilers. * alloca.c: Drop the register keyword. * header.c: Likewise. * lexxer.l: Likewise. * parser.y: Likewise. * routine.c: Likewise. * server.c: Likewise

Bug#720531: ifupdown: Fixes for Debian/Hurd

2013-08-23 Thread Justus Winter
Package: ifupdown Version: 0.7.8 Severity: wishlist Tags: patch Dear Maintainer, I've attached a patch series that fixes ifupdown to work properly on Debian/Hurd. The first patch makes ifupdown use inetutils-ifconfig instead of ifconfig and fixes its use in two cases. The second patch sanitizes

[PATCH 1/2] utils: escape arguments in fakeroot.sh

2013-08-23 Thread Justus Winter
fakeroot.sh uses /bin/sh to first change the working directory and then execute the given program in the fakeroot context. But the arguments given on the command line were not properly escaped: % '/bin/sh' '-c' 'echo $0' /bin/sh % fakeroot-tcp '/bin/sh' '-c' 'echo $0' /bin/sh % fakeroot-hurd '/bin

[PATCH 2/2] utils: escape arguments in remap.sh

2013-08-23 Thread Justus Winter
remap.sh uses /bin/sh to first change the working directory and then execute the given program in the remap context. But the arguments given on the command line were not properly escaped: % '/bin/sh' '-c' 'echo $0' /bin/sh % remap '/bin/sh' '-c' 'echo $0' % remap-fixed '/bin/sh' '-c' 'echo $0' /b

Re: Info request about project idea: Porting Valgrind to Hurd

2013-08-25 Thread Justus Winter
Hi Daniel :) Quoting Daniel de Castro (2013-08-24 03:08:02) > I'd like to work on this project, but I'd like to discuss the idea with > someone > more familiar to Valgrind and Hurd itself. This project is listed as an idea > project for GSOC but I'd like to work on it during the upcoming Fall, if

Re: [PATCH 1/2] utils: escape arguments in fakeroot.sh

2013-08-25 Thread Justus Winter
Quoting Ivan Shmakov (2013-08-25 17:55:39) > >>>>> Justus Winter <4win...@informatik.uni-hamburg.de> writes: > > […] > > > * utils/fakeroot.sh: Escape arguments handed to /bin/sh so that they > > are not evaluated prematurely. > > […] >

[PATCH] Fix argument parsing

2013-08-26 Thread Justus Winter
The switch statement was missing the default case returning ARGP_ERR_UNKNOWN. This patch adds that. * main.c (argp_parser): Add default case. --- main.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index 90b3e92..2bfa5c2 100644 --- a/main.c +++ b/main.c @@ -120,6 +120

[bug #19479] Using a buggy trivfs translator to kill you shell

2013-08-28 Thread Justus Winter
Follow-up Comment #1, bug #19479 (project hurd): This is easily explained, the shell isn't handling or ignoring SIGLOST: % settrans -ca node ./memfile % /bin/echo something > node [1]24909 resource lost /bin/echo something > node % settrans -ca node ./memfile % trap 'echo oops >&2' 32 % ech

Re: [PATCH] Make start_code and end_code available in /proc/*/stat

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-29 00:24:59) > Justus Winter, le Mon 05 Aug 2013 12:11:30 +0200, a écrit : > > + if (essential) > > + start_code = end_code = 0; /* To make killall5.c consider it a > > + kernel

Re: [PATCH 03/17] Add proc_set_init_task, make runsystem pid 1

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-29 01:48:10) > I think we should keep this in the Debian package, the upstream GNU > system will a priori still use /hurd/init as reaper. Well, it is not my place to question this and maintaining the patches is your burden, but I was hoping to remove the process re

Re: [PATCH 1/5] exec: remove support for transparently unbzip2ing executables

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-28 23:56:10) > Hello, > > Justus Winter, le Thu 15 Aug 2013 18:41:50 +0200, a écrit : > > Remove support for transparently unbzip2ing executables from the exec > > server. The code in question makes the exec server unnecessarily > >

Re: [PATCH 1/3] Define and use symbolic names for important processes

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-28 23:30:27) > Applied this one, thanks. This one as in the private header file? I've come across an issue with the header being private. This means that neither procfs (being maintained and compileable out-of-tree) nor the glibc can use the symbolic names. Justu

Re: [PATCH 1/3] Define and use symbolic names for important processes

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-29 12:28:34) > Justus Winter, le Thu 29 Aug 2013 12:22:30 +0200, a écrit : > > Quoting Samuel Thibault (2013-08-28 23:30:27) > > > Applied this one, thanks. > > > > This one as in the private header file? > > Yes. > > &

Re: [PATCH 1/5] exec: remove support for transparently unbzip2ing executables

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-29 12:32:50) > Justus Winter, le Thu 29 Aug 2013 12:16:11 +0200, a écrit : > > The patches were also ment to address the complexity^Wsheer size of > > the code. That is why I wanted to remove them, #ifdef'ing it out has a > > cost, not a

Re: [PATCH 1/5] exec: remove support for transparently unbzip2ing executables

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-29 12:52:39) > Justus Winter, le Thu 29 Aug 2013 12:41:47 +0200, a écrit : > > > At least to show flexibility of the exec server. The difference between > > > the BFD code and the gzip/bzip2 code is that the latter makes the whole > > >

Re: mtab translator (v4)

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-29 01:29:50) > Justus Winter, le Tue 30 Jul 2013 11:59:08 +0200, a écrit : > > [PATCH 01/16] libnetfs: implement file_get_translator_cntl > > [PATCH 02/16] libnetfs: handle dead-name notifications > > I have applied these for now. Why for now

Re: [PATCH] umount: add a umount utility

2013-08-29 Thread Justus Winter
Quoting Samuel Thibault (2013-08-29 21:10:17) > David Michael, le Thu 29 Aug 2013 15:04:34 -0400, a écrit : > > On Thu, Aug 15, 2013 at 2:23 AM, Justus Winter > > <4win...@informatik.uni-hamburg.de> wrote: > > > +#include > > > > Does umount.c use anythi

[PATCH] mount: handle -t auto

2013-08-30 Thread Justus Winter
Use libblkid to detect the filesystem type if "auto" is given as type. Remove the translator localization from main, this is also done in do_mount and any errors are propagated properly. This way "auto" is handled correctly if given on the command line or used as filesystem type in the fstab. * co

[PATCH] mount: handle -t auto

2013-09-02 Thread Justus Winter
Use libblkid to detect the filesystem type if "auto" is given as type. Remove the translator localization from main, this is also done in do_mount and any errors are propagated properly. This way "auto" is handled correctly if given on the command line or used as filesystem type in the fstab. * co

Re: [PATCH] mount: handle -t auto

2013-09-02 Thread Justus Winter
Quoting Justus Winter (2013-08-30 16:08:26) > Use libblkid to detect the filesystem type if "auto" is given as > type. Remove the translator localization from main, this is also done > in do_mount and any errors are propagated properly. This way "auto" is > h

[PATCH 1/2] libdiskfs: track file name in struct peropen

2013-09-02 Thread Justus Winter
Track the relative path used to obtain a file handle in the struct peropen. * libdiskfs/diskfs.h (struct peropen): New field path. * libdiskfs/peropen-make.c (diskfs_make_peropen): Initialize path. * libdiskfs/peropen-rele.c (diskfs_release_peropen): Free path. * libdiskfs/fsys-getroot.c (diskfs_S

[PATCH 2/2] libnetfs: track file name in struct peropen

2013-09-02 Thread Justus Winter
Track the relative path used to obtain a file handle in the struct peropen. * libnetfs/netfs.h (struct peropen): New field path. * libnetfs/make-peropen.c (netfs_make_peropen): Initialize path. * libnetfs/release-peropen.c (netfs_release_peropen): Free path. * libnetfs/fsys-getroot.c (netfs_S_fsys

[PATCH] Drop the auto keyword

2013-09-04 Thread Justus Winter
Drop the auto keyword from the generated source code. auto is the default storage type for variables anyway and it is customary to omit it. * utils.c (WriteCheckDecl): Drop auto from generated source. (WriteStaticLongDecl): Likewise. (WriteStaticShortDecl): Likewise. --- utils.c |6 +++--- 1

Another small cleanup for mig

2013-09-04 Thread Justus Winter
Hi :) this drops the auto keyword from sources generated by mig. Justus

Re: [PATCH 03/17] Add proc_set_init_task, make runsystem pid 1

2013-09-05 Thread Justus Winter
Quoting Justus Winter (2013-08-29 12:09:02) > Quoting Samuel Thibault (2013-08-29 01:48:10) > > I think we should keep this in the Debian package, the upstream GNU > > system will a priori still use /hurd/init as reaper. > > Well, it is not my place to question this and ma

[PATCH 2/2] kern: make the parent of a task available via task_info

2013-09-05 Thread Justus Winter
XXX: this most likely subverts the security of your system. DO NOT APPLY. * include/mach/task_info.h (struct task_basic_info): Add parent_task. * kern/task.c (task_info): Include a port to parent_task. --- include/mach/task_info.h |2 ++ kern/task.c |3 +++ 2 files changed, 5

[PATCH 1/2] kern: track the parent of a task

2013-09-05 Thread Justus Winter
Align Machs model of a task more closely with that of a Unix process by tracking the parent task. XXX: Not sure if it's worth keeping a real reference to the parent since that way we prevent the parent task from being collected if it dies before the child does. * kern/task.h (struct task): Add fi

Hacking gnumach to track parental relationship of tasks

2013-09-05 Thread Justus Winter
Hi, I made two rather small and (as I thought) straight forward changes to gnumach to keep track of a tasks father task and to make this information available. Now I know handing out task ports right and left is not a wise thing to do, but I wanted to do it this way as a first step. Unfortunately

[PATCH 5/7] hurd: add notification callbacks for the process management

2013-09-05 Thread Justus Winter
XXX * hurd/process_notify.defs: New file. --- hurd/process_notify.defs | 21 + 1 file changed, 21 insertions(+) create mode 100644 hurd/process_notify.defs diff --git a/hurd/process_notify.defs b/hurd/process_notify.defs new file mode 100644 index 000..7972ef7 --- /dev

[PATCH 7/7] hurd: add proc_notify_new_processes

2013-09-05 Thread Justus Winter
XXX * hurd/process.defs: Add proc_notify_new_processes. --- hurd/process.defs |5 + 1 file changed, 5 insertions(+) diff --git a/hurd/process.defs b/hurd/process.defs index b7e1775..37add48 100644 --- a/hurd/process.defs +++ b/hurd/process.defs @@ -383,3 +383,8 @@ routine proc_mark_impor

[PATCH 2/7] proc: Remove unused declaration of zombie_list

2013-09-05 Thread Justus Winter
* proc/proc.h (zombie_list): Remove declaration. --- proc/proc.h |2 -- 1 file changed, 2 deletions(-) diff --git a/proc/proc.h b/proc/proc.h index ed47ccc..4369abf 100644 --- a/proc/proc.h +++ b/proc/proc.h @@ -130,8 +130,6 @@ struct exc natural_t thread_state[0]; }; -struct zombie *zo

[PATCH 3/7] libihash: add HURD_IHASH_ITERATE_ITEMS macro

2013-09-05 Thread Justus Winter
Add a macro HURD_IHASH_ITERATE_ITEMS that iterates over all elements in the hash table making both the key and the value available. * libihash/ihash.h (HURD_IHASH_ITERATE_ITEMS): New macro. --- libihash/ihash.h | 17 + 1 file changed, 17 insertions(+) diff --git a/libihash/ihas

[PATCH 1/7] proc: remove unused file exc-reply.defs

2013-09-05 Thread Justus Winter
* proc/exc-reply.defs: Delete file. --- proc/exc-reply.defs | 36 1 file changed, 36 deletions(-) delete mode 100644 proc/exc-reply.defs diff --git a/proc/exc-reply.defs b/proc/exc-reply.defs deleted file mode 100644 index 8a04723..000 --- a/proc/exc-re

process change notification prototype

2013-09-05 Thread Justus Winter
Hi :) this is an early patch series implementing process notifications in the proc server. [PATCH 1/7] proc: remove unused file exc-reply.defs [PATCH 2/7] proc: Remove unused declaration of zombie_list Cleanups that can be merged independently of the rest. [PATCH 3/7] libihash: add HURD_IHASH_I

[PATCH 6/7] proc: implement proc_notify_new_processes

2013-09-05 Thread Justus Winter
XXX XXX --- proc/Makefile |5 +++-- proc/main.c |1 + proc/mgt.c| 37 + proc/proc.h |6 ++ 4 files changed, 47 insertions(+), 2 deletions(-) diff --git a/proc/Makefile b/proc/Makefile index 2eed13c..4f3be81 100644 --- a/proc/Makefile

[PATCH 4/7] libnotify: add a general notification library

2013-09-05 Thread Justus Winter
XXX --- libnotify/Makefile | 28 ++ libnotify/notify.c | 152 libnotify/notify.h | 50 + 3 files changed, 230 insertions(+) create mode 100644 libnotify/Makefile create mode 100644 libnotify/notify.c create mode 1

Re: Hacking gnumach to track parental relationship of tasks

2013-09-06 Thread Justus Winter
Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-09-05 18:11:43) > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > I made two rather small and (as I thought) straight forward changes to > > gnumach to keep track of a tasks father task and to make this &

Re: Hacking gnumach to track parental relationship of tasks

2013-09-06 Thread Justus Winter
Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-09-06 11:58:43) > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-09-05 18:11:43) > >> Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > &g

Re: Hacking gnumach to track parental relationship of tasks

2013-09-07 Thread Justus Winter
Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-09-07 14:37:03) > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-09-06 11:58:43) > >> Justus Winter <4win...@informatik.uni-hamburg.de> skribis: >

Re: [PATCH] device: cleanup of the TTY io

2013-09-08 Thread Justus Winter
Hi Marin :) I think it is awesome of you to start cleaning up gnumach, this is much overdue. But you shouldn't mash so many changes into one patch, rather split it up. By the way, gnumach uses git and using git it is very easy to keep separate changes in your local working branch in separate commi

Re: upstream GNU Hurd vs Debian GNU Hurd?

2013-09-09 Thread Justus Winter
Hi :) Quoting Samuel Thibault (2013-09-09 10:04:55) > Putting a proper subject and explicitly Cc-ing maintainers, otherwise > people will not notice the question under technical details :) Noted >,< > Justus Winter, le Thu 05 Sep 2013 13:04:35 +0200, a écrit : > > Turns ou

Re: [PATCH] mount: handle -t auto

2013-09-10 Thread Justus Winter
Quoting Samuel Thibault (2013-09-10 00:35:21) > David Michael, le Mon 09 Sep 2013 18:00:19 -0400, a écrit : > > I tried building mount and got a linker error due to missing the -lblkid. > > > > On Mon, Sep 2, 2013 at 4:55 AM, Justus Winter > > <4win...@in

Re: Hacking gnumach to track parental relationship of tasks

2013-09-10 Thread Justus Winter
Quoting Samuel Thibault (2013-09-09 19:40:23) > Ludovic Courtès, le Mon 09 Sep 2013 18:48:03 +0200, a écrit : > > Samuel Thibault skribis: > > > Ludovic Courtès, le Sat 07 Sep 2013 22:04:06 +0200, a écrit : > > >> However, wouldn’t it be preferable to fix it by interposing on > > >> ‘task_create’

Re: Hacking gnumach to track parental relationship of tasks

2013-09-11 Thread Justus Winter
Quoting Ludovic =?utf-8?Q?Court=C3=A8s?= (2013-09-10 20:00:32) > Justus Winter <4win...@informatik.uni-hamburg.de> skribis: > > > Quoting Samuel Thibault (2013-09-09 19:40:23) > >> Ludovic Courtès, le Mon 09 Sep 2013 18:48:03 +0200, a écrit : > >> > Sam

Re: glib2.0 test gio/tests/socket fails, BUG?

2013-09-13 Thread Justus Winter
Hi, Quoting Svante Signell (2013-09-13 00:01:20) > Another puzzling thing is how to find out which version is used for > which situation? For *_io_restrict_auth() there are plenty to choose > from: > > grep -r _io_restrict_auth ../../hurd/hurd-20130727/ > pfinet/io-ops.c:S_io_restrict_auth > pflo

Re: [PATCH 16/16] trans: add mtab translator

2013-09-16 Thread Justus Winter
Quoting Samuel Thibault (2013-09-15 23:27:58) > Justus Winter, le Tue 30 Jul 2013 11:59:24 +0200, a écrit : > > + if (strncmp (device, "device:", 7) == 0) > > +asprintf (path, "/dev/%s", &device[7]); > > + else if (strncmp (device, &quo

[PATCH 1/2] proc: do not hand out PID 0

2013-09-16 Thread Justus Winter
Using PID 0 causes various problems. This makes genpid skip PID 0. * proc/mgt.c (genpid): Start PIDs at 1. --- proc/mgt.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proc/mgt.c b/proc/mgt.c index c093b8f..d7ad296 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -862,7 +862,7

make /hurd/proc run as PID 3, do not use PID 0

2013-09-16 Thread Justus Winter
Hi ;) Richard asked me to make /hurd/proc run with a PID other than 0 because that causes various problems. I fully agree. Fortunately the fix is straight forward. Justus

[PATCH 2/2] include: make /hurd/proc PID 3

2013-09-16 Thread Justus Winter
Using PID 0 is problematic for various reasons. Make /hurd/proc run as PID 3 instead. * include/pids.h: Make /hurd/proc PID 3. --- include/pids.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pids.h b/include/pids.h index 485916b..22415f4 100644 --- a/include/pids

Re: make /hurd/proc run as PID 3, do not use PID 0

2013-09-16 Thread Justus Winter
Quoting Samuel Thibault (2013-09-16 12:41:19) > Justus Winter, le Mon 16 Sep 2013 12:20:24 +0200, a écrit : > > Richard asked me to make /hurd/proc run with a PID other than 0 > > because that causes various problems. > > What kind of problem for instance? (at least

cgroupfs, /hurd/proc and subhurds

2013-09-16 Thread Justus Winter
Hi :) this mail discusses my recent attempts of creating a cgroupfs, related problems and issues I encountered so far. Problem statement = Linux has this feature called cgroups. It groups processes (threads) together in groups, furthermore so called controllers can be used to res

[PATCH 1/7] libnotify: add a general notification library

2013-09-16 Thread Justus Winter
XXX --- libhurdnotify/Makefile | 28 ++ libhurdnotify/notify.c | 251 libhurdnotify/notify.h | 73 ++ 3 files changed, 352 insertions(+) create mode 100644 libhurdnotify/Makefile create mode 100644 libhurdnotify/notify.c crea

[PATCH 4/7] proc: implement proc_request_process_change_notification

2013-09-16 Thread Justus Winter
XXX XXX --- proc/Makefile |5 +++-- proc/main.c |3 +++ proc/mgt.c| 35 +++ proc/proc.h |6 ++ 4 files changed, 47 insertions(+), 2 deletions(-) diff --git a/proc/Makefile b/proc/Makefile index 2eed13c..97d9077 100644 --- a/proc/Makefile

[PATCH 5/7] hurd: add proc_request_process_change_notification

2013-09-16 Thread Justus Winter
XXX * hurd/process.defs: Add proc_request_process_change_notification. --- hurd/process.defs |6 ++ 1 file changed, 6 insertions(+) diff --git a/hurd/process.defs b/hurd/process.defs index bf90556..565d8bf 100644 --- a/hurd/process.defs +++ b/hurd/process.defs @@ -400,3 +400,9 @@ routine

[PATCH 6/7] FIX BUILD

2013-09-16 Thread Justus Winter
--- init/Makefile |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/Makefile b/init/Makefile index cf4d492..fc2a647 100644 --- a/init/Makefile +++ b/init/Makefile @@ -21,7 +21,7 @@ makemode := server SRCS = init.c stubs.c OBJS = $(SRCS:.c=.o) \ startupServer.o n

[PATCH 7/7] XXX: register for new task notifications

2013-09-16 Thread Justus Winter
* proc/Makefile: XXX add gnumach stubs. * proc/main.c (message_demuxer): Add task_notify_server. (main): Register for new task notificatinos. (main): Get all tasks created prior to registering the notifications. * proc/mgt.c (S_mach_notify_new_task): Add server function. --- proc/Makefile |5 +

[PATCH 2/7] init: use libhurdnotify for shutdown notifications

2013-09-16 Thread Justus Winter
XXX --- init/Makefile |2 +- init/init.c | 87 + 2 files changed, 33 insertions(+), 56 deletions(-) diff --git a/init/Makefile b/init/Makefile index ffb82ff..cf4d492 100644 --- a/init/Makefile +++ b/init/Makefile @@ -23,7 +23,7 @@ OB

<    1   2   3   4   5   6   7   8   9   10   >