Re: [PATCH] trans/fakeroot: shutdown the translator if the last client is gone

2013-12-19 Thread Samuel Thibault
Justus Winter, le Thu 19 Dec 2013 12:47:37 +0100, a écrit : > Previously, fakeroot would not exit if a process outlived the original > process started by settrans. This caused bugs like this: > > % fakeroot-hurd /bin/sh -c 'sleep 1&' 2>&1 | tee > > > Fix this by exiting if the last client of fa

Re: [PATCH 2/2] ddb/db_command.c (db_help_cmd): mark with attribute unused

2013-12-19 Thread Samuel Thibault
Marin Ramesa, le Thu 19 Dec 2013 18:51:06 +0100, a écrit : > * ddb/db_command.c (db_help_cmd): Mark with attribute unused. Err, well, no, on the contrary. Marking the function as unused silences the warning, and thus maintainers won't realize any more that it is unused, and thus the probability of

Re: [PATCH 1/2] kern/strings.c (strlen): mark with attribute pure

2013-12-19 Thread Samuel Thibault
Marin Ramesa, le Thu 19 Dec 2013 18:51:05 +0100, a écrit : > * kern/strings.c (strlen): Mark with attribute pure. Also add the attribute to the header. It's actually *there* that it is useful, for the caller to know that the function calls can be optimized away. > --- > kern/strings.c | 2 +- >

[PATCH 1/2] Declare void argument lists (part 2)

2013-12-19 Thread Marin Ramesa
Declare void argument lists that were not declared in the first part of this patch and * kern/sched_prim.h (recompute_priorities): Fix prototype. * kern/startup.c (setup_main) (recompute_priorities): Fix call. --- ddb/db_break.h | 4 ++-- ddb/db_watch.c | 2 +- device/blkio.c |

[PATCH 2/2] ddb/db_watch.c (db_watchpoint_cmd): remove forward declaration

2013-12-19 Thread Marin Ramesa
* ddb/db_watch.c (db_watchpoint_cmd) (db_option): Remove forward declaration. --- ddb/db_watch.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ddb/db_watch.c b/ddb/db_watch.c index 5551e66..dbb4aea 100644 --- a/ddb/db_watch.c +++ b/ddb/db_watch.c @@ -242,7 +242,6 @@ db_watchpoint_cmd(addr, h

[PATCH 2/2] ddb/db_command.c (db_help_cmd): mark with attribute unused

2013-12-19 Thread Marin Ramesa
* ddb/db_command.c (db_help_cmd): Mark with attribute unused. --- ddb/db_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddb/db_command.c b/ddb/db_command.c index 3257e07..74134fb 100644 --- a/ddb/db_command.c +++ b/ddb/db_command.c @@ -382,7 +382,7 @@ struct db_comm

Suggestion to use more of GCC function attributes

2013-12-19 Thread Marin Ramesa
We already have noreturn attribute. I have identified two more attributes that might be useful. These are pure and unused. [PATCH 1/2] kern/strings.c (strlen): mark with attribute pure Attribute pure means that a function doesn't have any effects except the return value, and the return value does

[PATCH 1/2] kern/strings.c (strlen): mark with attribute pure

2013-12-19 Thread Marin Ramesa
* kern/strings.c (strlen): Mark with attribute pure. --- kern/strings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kern/strings.c b/kern/strings.c index 0752722..72eb4f3 100644 --- a/kern/strings.c +++ b/kern/strings.c @@ -161,7 +161,7 @@ strncpy( * the terminating

updated patch

2013-12-19 Thread Justus Winter
Richard mentioned a use case I had not considered, binding /hurd/fakeroot to a node rather than using settrans --chroot. The patch now covers this use case by also checking for control ports. Justus

[PATCH] trans/fakeroot: shutdown the translator if the last client is gone

2013-12-19 Thread Justus Winter
Previously, fakeroot would not exit if a process outlived the original process started by settrans. This caused bugs like this: % fakeroot-hurd /bin/sh -c 'sleep 1&' 2>&1 | tee Fix this by exiting if the last client of fakeroot goes away. If noone has a right to any control or protid port, noo