[Solved] newgrp creates a subshell!
Posted: 2025-01-15 18:38
See the attached image description and then note the behaviour when executing the command. They don't match.
LOL
I want to temporarily set my GID value to "devel" so that when I run my IDE the output files are GID=devel, but I don't want my main user GID to default to devel.
The newgrp command spawns a subshell that must be exited when done. That causes me problems. I need the GID switch to occur in the current shell.
Am I going to have to hack the bash sourcecode or is there another way?
And yes, I understand the chmod g+s mechanism, but it only applies to directory heirarchies where it has been set.
LOL
I want to temporarily set my GID value to "devel" so that when I run my IDE the output files are GID=devel, but I don't want my main user GID to default to devel.
The newgrp command spawns a subshell that must be exited when done. That causes me problems. I need the GID switch to occur in the current shell.
Am I going to have to hack the bash sourcecode or is there another way?
And yes, I understand the chmod g+s mechanism, but it only applies to directory heirarchies where it has been set.