aboutsummaryrefslogtreecommitdiff
path: root/acid/transcript
blob: 023dabda01c0ac003b9f1e15359da4cc7b261d5b (plain)
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
#!/bin/rc
switch($#*){
case 0 1 2
	echo usage: window '''minx miny maxx maxy''' '''minx miny maxx maxy''' cmd args ...
	exit usage
}

rfork ns

if(mount $wsys /mnt/acid N`{{echo $pid $1 }| sed 's/^ //g;s/ +/,/g'}){
	winid=`{cat /dev/winid}
	echo transcript > /mnt/acid/label
	echo transcript > /mnt/acid/cons
	shift
}
if not exit 0

if(mount $wsys /mnt/wsys N`{{echo $pid $1 }| sed 's/^ //g;s/ +/,/g'}){
	shift
	bind -b /mnt/wsys /dev
}
if not exit 0

echo -n `{basename $1} > /dev/label >[2] /dev/null
@{
	echo hang > /proc/^`{cat /dev/ppid}^/ctl
	$* < /dev/$winid/cons > /dev/$winid/cons >[2] /dev/$winid/cons &
	exit $apid
}
ostatus = `{echo $status | sed 's/.*://'}
echo waitstop > /proc/$ostatus/ctl
echo nohang > /proc/$ostatus/ctl
exit $ostatus