rcpu: make sure not to leak /env/fn#server and /env/fn#aanserver for drawterm (thanks mischief)
This commit is contained in:
parent
ff47cbd464
commit
2763229c00
2 changed files with 2 additions and 1 deletions
|
@ -60,9 +60,9 @@ if(~ $filter aan){
|
|||
rfork n
|
||||
fn server {
|
||||
echo -n aanserver $netdir >/proc/$pid/args
|
||||
rm -f /env/^('fn#server' 'fn#aanserver')
|
||||
. <{n=`{read} && ! ~ $#n 0 && read -c $n} >[2=1]
|
||||
}
|
||||
rm -f /env/^'fn#aanserver'
|
||||
exec tlssrv -A /bin/rc -c server
|
||||
exit
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ netdir=$3
|
|||
remote=$2!`{cat $3/remote}
|
||||
fn server {
|
||||
echo -n $netdir $remote >/proc/$pid/args
|
||||
rm -f /env/'fn#server'
|
||||
. <{n=`{read} && ! ~ $#n 0 && read -c $n} >[2=1]
|
||||
}
|
||||
exec tlssrv -a /bin/rc -c server
|
||||
|
|
Loading…
Reference in a new issue