Server for Information Technologies

(095) 932-9212, 932-9213, 939-0783
E-mail: info@citforum.ru
(!) CIT Forum CD-ROM

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] Command arg eoppe.
[EPERM] e ooaec ID eyeo poecca e pepoa o, pea ooaec ID e coaa c e pea ooaec ID poecca, oopoy apecoaa command.
[ENOMEM] Heocaoo a.
[EFAULT] Apec, aa arg, xo a pee apecoo pocpaca poecca.

Opae o a
Bo exec(3) aapo aepaec, ec oac coa e oaaec ocaooo eca. o opaee oe co cooae ceyx ae apyea command y proctl:
PRHUGEX 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.
PRNORMX oeae poecc a ecoco a c oo exec(3) 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);
	     exit(2);
	}
	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.

.
exec(3), ioctl(3), kill(3)

AEA
popa, coye y, o oooac c ao -lx.
Comments: info@citmgu.ru
Designed by Andrey Novikov
Copyright © CIT