gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, xgawk, updated. aa23de50eb7c81a3e8f94769


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, xgawk, updated. aa23de50eb7c81a3e8f94769c5288aecfeb52b4c
Date: Tue, 03 Apr 2012 02:37:11 +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 has been updated
       via  aa23de50eb7c81a3e8f94769c5288aecfeb52b4c (commit)
      from  d6d6a4ac9c6eb33a71595fd596b9a8f2db6444b7 (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=aa23de50eb7c81a3e8f94769c5288aecfeb52b4c

commit aa23de50eb7c81a3e8f94769c5288aecfeb52b4c
Author: Andrew J. Schorr <address@hidden>
Date:   Mon Apr 2 22:36:26 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]