Hurd: Make gdb/reply_mig_hack.awk script compatible to "mawk" (was: [RFC] GDB Hurd Fixes)

2016-01-12 Thread Thomas Schwinge
Hi!

On Mon, 6 Jan 2014 17:56:27 +0100, I wrote:
> On Fri, 20 Sep 2013 11:17:08 -0400, David Michael  
> wrote:
> > mig has stopped using the "auto" keyword in its output.[1]
> > Without that keyword, gdb/reply_mig_hack.awk fails to match a
> > necessary pattern and outputs a bad gdb/process_reply_S.c file.

> commit d8131897afba28934ced82c507114123027a40f8
> Author: Thomas Schwinge 
> Date:   Mon Jan 6 15:56:33 2014 +0100
> 
> Hurd: Adapt to changed MIG output.
> 
>   gdb/
>   * reply_mig_hack.awk: Don't expect to see the auto keyword.
> 
> Based on patch by David Michael .
> 
> diff --git gdb/reply_mig_hack.awk gdb/reply_mig_hack.awk
> index 97e080f..e137a27 100644
> --- gdb/reply_mig_hack.awk
> +++ gdb/reply_mig_hack.awk
> @@ -78,9 +78,9 @@ parse_phase == 4 {
>print; next;
>  }
>  
> -parse_phase == 5 && /^[ \t]*(auto|static) const mach_msg_type_t/ {
> +parse_phase == 5 && /^[ \t]*(auto |static |)const mach_msg_type_t/ {
># The type check structure for an argument.
> -  arg_check_name[num_checks] = $4;
> +  arg_check_name[num_checks] = $(NF - 2);
>num_checks++;
>print; next;
>  }

Turns out that the "mawk" AWK implementation doesn't like that regular
expression:

mawk: [...]/gdb/reply_mig_hack.awk: line 98: regular expression compile 
failed (missing operand)

I didn't check it against the AWK language definition, but instead just
made the gdb/reply_mig_hack.awk script compatible to "mawk"; pushed:

commit 5eddd57823971bdb54f957d10c11ff3fc9f97b1e
Author: Thomas Schwinge 
Date:   Tue Jan 12 12:53:09 2016 +0100

Hurd: Make gdb/reply_mig_hack.awk script compatible to "mawk"

The "mawk" AWK implementation did't like that regular expression:

mawk: [...]/gdb/reply_mig_hack.awk: line 98: regular expression compile 
failed (missing operand)

gdb/
* reply_mig_hack.awk: Rewrite one regular expression.
---
 gdb/ChangeLog  | 4 
 gdb/reply_mig_hack.awk | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git gdb/ChangeLog gdb/ChangeLog
index 099a9a9..73b001c 100644
--- gdb/ChangeLog
+++ gdb/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-12  Thomas Schwinge  
+
+   * reply_mig_hack.awk: Rewrite one regular expression.
+
 2016-01-11  Mike Frysinger  
 
* acinclude.m4: Include new warning.m4 file.
diff --git gdb/reply_mig_hack.awk gdb/reply_mig_hack.awk
index 1e2387a..e4c513b 100644
--- gdb/reply_mig_hack.awk
+++ gdb/reply_mig_hack.awk
@@ -95,7 +95,7 @@ parse_phase == 4 {
   print; next;
 }
 
-parse_phase == 5 && /^[ \t]*(auto |static |)const mach_msg_type_t/ {
+parse_phase == 5 && /^[ \t]*(auto |static )?const mach_msg_type_t/ {
   # The type check structure for an argument.
   arg_check_name[num_checks] = $(NF - 2);
   num_checks++;


Grüße
 Thomas


signature.asc
Description: PGP signature


Re: (was: Small web server for the Hurd)

2016-01-12 Thread Richard Braun
On Mon, Jan 11, 2016 at 04:56:31PM +0100, Thomas Schwinge wrote:
> Hi!
> 
> On Sun, 22 Nov 2015 01:01:09 +0100, Richard Braun  wrote:
> > It looks like some changes in the past months have increased the
> > severity of some bugs apache is having when spawning CGIs, resulting
> > in unkillable processes and the freezing of the parent apache process.
> > This had the effect of making the darnassus.sceen.net server almost
> > unusable publicly.
> 
> :-/

FYI, the problem still occurs, although much less frequently. I assume
there is a race issue with exec/fork. The tough part is that SIGKILL is
unable to kill those bogus child processes, forcing a complete system
reset.

-- 
Richard Braun



Re: [PATCH] fix the trailing slash issue in dir_lookup calls

2016-01-12 Thread Samuel Thibault
Flavio Cruz, on Mon 11 Jan 2016 02:16:08 +0100, wrote:
> I'm sending a new version of patch, which includes the required changes
> in both libnetfs and libdiskfs.

Applied, thanks!

Samuel