From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075323306658.tru64-unix-managers.marc@archive.invalid> From: Nick Hill - RAL CISD Systems Group Date: Thu, 21 Sep 1995 17:31:45 +0000 To: tru64-unix-managers Subject: Setting real GID of another process X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075323306658 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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++