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["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
|Nodes:||10 (0 / 10)|