Spec-Zone.ru › Linux man pages

pmsetprocessidentity(3) — Справочная страница Linux

PMSETPROCESSIDENTITY(3) Library Functions Manual PMSETPROCESSIDENTITY(3)

НАЗВАНИЕ

       pmSetProcessIdentity - set process user and group id

СИНТАКСИС НА C

       #include <pcp/pmapi.h>

       int pmSetProcessIdentity(const char *username);

       cc ... -lpcp

ОПИСАНИЕ

       pmSetProcessIdentity provides a platform-independent method to
       set the user id of a process to that matching username.

       If possible (when the caller is already running as root)
       pmSetProcessIdentity will set the group id of the process to that
       of the matching user, e.g. using username and getpwnam(3).

       A return value of 0 indicates success, otherwise the return value
       is an error code that may be decoded with pmErrStr(3).

       pmSetProcessIdentity is most often used in conjunction with
       pmGetUsername(3) at process start up.

СМОТРИТЕ ТАКЖЕ

       getpwnam(3), PMAPI(3), pmErrStr(3), pmGetUsername(3), setgid(3)
       and setuid(3).

КОЛОФОН

       This page is part of the PCP (Performance Co-Pilot) project.
       Information about the project can be found at 
       ⟨http://www.pcp.io/⟩.  If you have a bug report for this manual
       page, send it to pcp@groups.io.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/performancecopilot/pcp.git⟩ on 2024-06-14.
       (At that time, the date of the most recent commit that was found
       in the repository was 2024-06-14.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there
       is a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

Performance Co-Pilot               PCP           PMSETPROCESSIDENTITY(3)

Страницы, которые ссылаются на эту страницу: pmgetusername(3)


...
https://man7.org/linux/man-pages/man3/pmsetprocessidentity.3.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API