Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PROCINFO["pgrpid"]

26 views
Skip to first unread message

Kenny McCormack

unread,
Dec 6, 2022, 12:07:47 PM12/6/22
to
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.

J Naman

unread,
Dec 6, 2022, 8:09:50 PM12/6/22
to
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

Kenny McCormack

unread,
Dec 7, 2022, 2:44:03 AM12/7/22
to
In article <44931e35-d832-49dc...@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
0 new messages