changelog shortlog tags branches changeset files revisions annotate raw help

Mercurial > hg > plan9front / rc/bin/service/tcp17019

changeset 5258: 881e65089358
parent: 65abc13ef7a1
child: 5585538c4cf6
author: cinap_lenrek@felloff.net
date: Wed, 20 Apr 2016 00:41:03 +0200
permissions: -rwxr-xr-x
description: rcpu: make sure not to leak /env/fn#server and /env/fn#aanserver for drawterm (thanks mischief)
1 #!/bin/rc
2 netdir=$3
3 remote=$2!`{cat $3/remote}
4 fn server {
5  echo -n $netdir $remote >/proc/$pid/args
6  rm -f /env/'fn#server'
7  . <{n=`{read} && ! ~ $#n 0 && read -c $n} >[2=1]
8 }
9 exec tlssrv -a /bin/rc -c server