• PROCINFO["pgrpid"]

    From Kenny McCormack@21:1/5 to All on Tue Dec 6 17:07:44 2022
    Was playing around with it today, and noticed that while you can assign to
    it (i.e., it is not "read-only" in GAWK terms), changing it does not
    actually change the process group ID. Would be nice if it did. I.e.,
    setting that array element would cause GAWK to invoke the appropriate
    setpgid() call to change GAWK's process group ID [*].

    Note, incidentally, that (as currently written, that is, w/o the
    improvement suggested above) changing that array element would render false
    the assertion (in the man page) that the array element contains "The value
    of the getpgrp() system call.". Implementing the suggested change would maintain the accuracy of that assertion.

    BTW, what sort of contents does this (and similar) PROCINFO element(s)
    contain on non-Unix/Linux system (e.g., a "native" Windows port - not
    Cygwin, of course, where, I expect, it would return sensible values as
    under Unix/Linux) ?

    [*] Note that I can, of course, change the process group ID of a GAWK
    program, using the call_any() extension, but this is not available to most users.

    --
    That's the Trump playbook. Every action by Trump or his supporters can
    be categorized as one (or more) of:

    outrageous, incompetent, or mentally ill.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From J Naman@21:1/5 to Kenny McCormack on Tue Dec 6 17:09:48 2022
    On Tuesday, 6 December 2022 at 12:07:47 UTC-5, Kenny McCormack wrote:
    Was playing around with it today, and noticed that while you can assign to
    it (i.e., it is not "read-only" in GAWK terms), changing it does not
    actually change the process group ID. Would be nice if it did. I.e.,
    setting that array element would cause GAWK to invoke the appropriate setpgid() call to change GAWK's process group ID [*].

    Note, incidentally, that (as currently written, that is, w/o the
    improvement suggested above) changing that array element would render false the assertion (in the man page) that the array element contains "The value
    of the getpgrp() system call.". Implementing the suggested change would maintain the accuracy of that assertion.

    BTW, what sort of contents does this (and similar) PROCINFO element(s) contain on non-Unix/Linux system (e.g., a "native" Windows port - not
    Cygwin, of course, where, I expect, it would return sensible values as
    under Unix/Linux) ?

    [*] Note that I can, of course, change the process group ID of a GAWK program, using the call_any() extension, but this is not available to most users.

    --
    That's the Trump playbook. Every action by Trump or his supporters can
    be categorized as one (or more) of:

    outrageous, incompetent, or mentally ill.

    RE: contents of PROCINFO element(s) on non-Unix/Linux system

    OS: Windows_NT = Win 7 SP1 [Version 6.1.7601]
    Machine: x86(32-bit gawk) under a 64-bit OS

    PROCINFO["platform"]= mingw
    PROCINFO["ppid"]= 0
    PROCINFO["pgrpid"]= 0
    PROCINFO["gid"]= 0
    PROCINFO["egid"]= 0
    PROCINFO["uid"]= 0
    PROCINFO["euid"]= 0
    PROCINFO["pid"]= 6272 (which is a legit pid)

    Gawk Version: GNU Awk 5.2.1, API 3.2, (GNU MPFR 4.0.2, GNU MP 6.1.2)
    Date: Tue Dec 06 2022 20:54:26 UTC Tue Dec 06 2022 15:54:26 -0500 EST

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to All on Wed Dec 7 07:44:01 2022
    In article <44931e35-d832-49dc-8033-d7aea039d428n@googlegroups.com>,
    ...
    RE: contents of PROCINFO element(s) on non-Unix/Linux system

    OS: Windows_NT = Win 7 SP1 [Version 6.1.7601]
    Machine: x86(32-bit gawk) under a 64-bit OS

    PROCINFO["platform"]= mingw
    PROCINFO["ppid"]= 0
    PROCINFO["pgrpid"]= 0
    PROCINFO["gid"]= 0
    PROCINFO["egid"]= 0
    PROCINFO["uid"]= 0
    PROCINFO["euid"]= 0
    PROCINFO["pid"]= 6272 (which is a legit pid)

    Gawk Version: GNU Awk 5.2.1, API 3.2, (GNU MPFR 4.0.2, GNU MP 6.1.2)
    Date: Tue Dec 06 2022 20:54:26 UTC Tue Dec 06 2022 15:54:26 -0500 EST

    OK, thanks.

    It's about what I would have expected.

    Just out of curiosity, from whence did your version of GAWK come?
    Who compiled it?

    --
    The randomly chosen signature file that would have appeared here is more than 4 lines long. As such, it violates one or more Usenet RFCs. In order to remain in compliance with said RFCs, the actual sig can be found at the following URL:
    http://user.xmission.com/~gazelle/Sigs/Seriously

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)