Unix Man ( )


PROCTL(3)


PROCTL(3)
XENIX System V (21 1987)


proctl - ypae a poecca pya poecco

#include <sys/proctl.h>

proctl (pid, command, arg) int pid, command; char *arg;


Proctl oe ec c a poecca pya poecco. Oa ee o e opa, o y ioctl(S), o aece epoo apyea eco oepa opoo aa coye ID poecca pid.

Command ocpeco coecoo aaoa eoo ca aae oeoe ece. Arg ec yaaee a cpyypy ax, opeey apaep, cae c command.

Ec pid oe 0, command oecye a poecc, e ID pae pid. Pid oe pae 1.

Ec pid pae 0, command oecye a ce poecc (poe poecco c ID 0 1), xoe y e pyy poecco, o ey poecc.

Ec pid pae -1 e ooaec ID eyeo poecca e pepoa, command oecye a ce poecc (poe poecco c ID 0 1), e pea ooaec ID pae eoy ooaecoy ID eyeo poecca.

Ec pid pae -1 e ooaec ID eyeo poecca pepoa, command oecye a ce poecc (poe poecco c ID 0 1).

Ec pid opaee, o e pae -1, command oecye a ce poecc, xoe pyy c ID, pa acooy ae pid.

Proctl aapo aepaec, ec oec xo oo ceyx yco:

[EINVAL] [EPERM] [ENOMEM] [EFAULT]
Command arg eoppe.
e ooaec ID eyeo poecca e pepoa o, pea ooaec ID e coaa c e pea ooaec ID poecca, oopoy apecoaa command.
Heocaoo a.
Apec, aa arg, xo a pee apecoo pocpaca poecca.

Opae o a


Bo aapo aepaec, ec oac coa e oaaec ocaooo eca. o opaee oe co cooae ceyx ae apyea command y proctl:

PRHUGEX PRNORMX
oeae poecc a HUGE, o ooe ey o popa ae, ec o pea ocy oe oac coa. e ooaec ID oeaeo poecca oe pepoa, HUGE poecc opyc oepao a, o ea coa. poecc, oee a HUGE, o e pea ocyoo oea oac coa, ee ce o opao, o e oe peopaoa opoa poecc.
oeae poecc a ecoco a c oo HUGE popa. Tay oey oe cea o ooae. Ec eaec oa oe a opao poecc, oop ye e oeaec oac coa, proctl aepaec c oo EINVAL.

Cey pae oa ooe poeccy oc ae, ec eo e eca oac coa:

if(argc<2) { fputs("usage: runbig command arg ...\n",stderr); ; } argv[argc]=0; if(proctl(getpid(),PRHUGEX,(char *)0)<0) { perror("runbig"); exit(1); }

BOPAAEOE AEE


B cyae o opaaec aee -1 errno aocc o o.

.


, ioctl(3), kill(3)

AEA


popa, coye y, o oooac c ao -lx.