aboutsummaryrefslogtreecommitdiff
path: root/sys/etc/prenvfree.x
blob: 909087894044214b81bbf67f95d3560c0c950c2a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

# PRENVFREE -- Free any recently defined or redefined environment variables,
# updating the values of any redefined variables uncovered by the free
# operation in the specified connected subprocesses.

int procedure prenvfree (pid, marker)

int	pid		# pid of process to be updated, or 0 for all subprocs
int	marker		# stack pointer returned by ENVMARK

int	ev_pid
common	/prvcom/ ev_pid
int	locpr(), envfree()
extern	prv_reset()

begin
	ev_pid = pid
	return (envfree (marker, locpr (prv_reset)))
end


# PRV_RESET -- Reset the value of an environment variable in the specified
# connected subprocesses.

procedure prv_reset (name, value)

char	name[ARB]		# name of variable to be reset
char	value[ARB]		# new value

int	ev_pid
common	/prvcom/ ev_pid

begin
	call prenvset (ev_pid, name, value)
end