tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Nick Hill - RAL CISD Systems Group <NMH1 () axprl1 ! rl ! ac ! uk>
To: tru64-unix-managers
Subject: Setting real GID of another process
Date: Thu, 21 Sep 1995 17:31:45 +0000	[thread overview]
Message-ID: <96075323306658.tru64-unix-managers.marc@archive.invalid> (raw)

Dear all,

A slightly strange request but I need to be able to do the equivalent of a
newgrp command within script files as some users need to be able to have CPU
time for different jobs accounted against different UID/GID combinations.
Executing a newgrp command in a script dosen't seem to work as as the man 
page states "the shell you were using when you issued the newgrp command is
unavailable after the newgrp command finishes" so anything in the script file 
after the newgrp command gets lost. What I need to be able to do is provide a 
utility to for an existing process to set its real and effective gid without
making the original shell "unavailable". Using setregid from a program will 
not do as you cannot give a PID to this call. I can exxamine the real and 
effective gid via the /proc filesystem or via a table call but how can I set it?

By way of explanation this is needed for jobs run via packages such as NQS or 
LSF so that users who have CPU time allocated to different projects controlled
via UNIX groups can charge time to different budgets or allocations from a 
single userid. Believe me this is really wanted at our site.

-
Nick Hill

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Computing and Information Systems Department
Rutherford Appleton Laboratory
Chilton 
Didcot                                 Internet: nmh1@axprl1.rl.ac.uk
Oxfordshire                               Janet: nmh1@uk.ac.rl.axprl1
OX11 0QX                                 DECnet: omni:.uk.ac.rl.axprl1::nmh1
ENGLAND                                          20054::nmh1
                       WWW: http://www.cis.rl.ac.uk/people/nmh1/contact.html
Tel: +44 (0)1235-445598                       
Fax: +44 (0)1235-446626
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

                 reply	other threads:[~1995-09-21 17:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox