newgrp in 4.2: missing?

jsdy at hadron.UUCP jsdy at hadron.UUCP
Wed Feb 5 14:41:59 AEST 1986


Newgrp's function was to be exec'd by the shell without forking,
change the process group-id, and then exec another shell.  Depending
on which version of which Unix you got, I don't think there was any
guarantee it would read your .profile.  (Opinions differed -- this
is why csh has .cshrc and .login, and ksh has ${ENV} and .profile.)
The two things that process group-id's were used for were to control
access relative to files' group permissions, and to determine what
group would be associated with files that were written.

Under 4.2 BSD, processes still have group-id's, the way humans still
have appendices.  They aren't used for anything I can see.  File access
is determined by your group vector, rather than your group ID.  (Rather
a neat idea, but can cause problems, such as ...)  So which group ID
goes with a created file?  None:  it inherits it from the directory
in which it finds itself.

Thus, Berkelians figured that 'newgrp' no longer needed to exist.
However, right again, this breaks existing code that calls newgrp.
-flame- .sputter.
-- 

	Joe Yao		hadron!jsdy at seismo.{CSS.GOV,ARPA,UUCP}



More information about the Comp.unix mailing list