gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, xgawk-build, updated. caaf36c8363f928043


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, xgawk-build, updated. caaf36c8363f9280433f37615ec41d606281136e
Date: Tue, 03 Apr 2012 02:37:09 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, xgawk-build has been updated
       via  caaf36c8363f9280433f37615ec41d606281136e (commit)
      from  f53d7e7b6afd4fbbc00c89a19d595c29998633c6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=caaf36c8363f9280433f37615ec41d606281136e

commit caaf36c8363f9280433f37615ec41d606281136e
Author: Andrew J. Schorr <address@hidden>
Date:   Mon Apr 2 22:36:42 2012 -0400

    Minor extension fixes.

diff --git a/extension/ChangeLog b/extension/ChangeLog
index dc017d3..287ce30 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-02         Andrew J. Schorr     <address@hidden>
+
+       * fork.c (do_fork): Test whether PROCINFO_node exists before updating
+       the pid values.  And do so properly using make_number.
+       * readfile.c (do_readfile): Function should be static.
+
 2012-04-01         Andrew J. Schorr     <address@hidden>
 
        * filefuncs.c (do_chdir, do_stat): Replace update_ERRNO() with
diff --git a/extension/fork.c b/extension/fork.c
index 8b8558e..7d6ab36 100644
--- a/extension/fork.c
+++ b/extension/fork.c
@@ -45,15 +45,17 @@ do_fork(int nargs)
 
        if (ret < 0)
                update_ERRNO_int(errno);
-       else if (ret == 0) {
+       else if (ret == 0 && PROCINFO_node != NULL) {
                /* update PROCINFO in the child */
 
                aptr = assoc_lookup(PROCINFO_node, tmp = make_string("pid", 3));
-               (*aptr)->numbr = (AWKNUM) getpid();
+               unref(*aptr);
+               *aptr = make_number((AWKNUM) getpid());
                unref(tmp);
 
                aptr = assoc_lookup(PROCINFO_node, tmp = make_string("ppid", 
4));
-               (*aptr)->numbr = (AWKNUM) getppid();
+               unref(*aptr);
+               *aptr = make_number((AWKNUM) getppid());
                unref(tmp);
        }
 
diff --git a/extension/readfile.c b/extension/readfile.c
index 9c18601..57cf6cd 100644
--- a/extension/readfile.c
+++ b/extension/readfile.c
@@ -41,7 +41,7 @@ int plugin_is_GPL_compatible;
 
 /* do_readfile --- read a file into memory */
 
-NODE *
+static NODE *
 do_readfile(int nargs)
 {
        NODE *filename;

-----------------------------------------------------------------------

Summary of changes:
 extension/ChangeLog  |    6 ++++++
 extension/fork.c     |    8 +++++---
 extension/readfile.c |    2 +-
 3 files changed, 12 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]