[patch] applied: lookmanexit

0 views
Skip to first unread message

9cha...@cat-v.org

unread,
May 10, 2008, 4:44:03 PM5/10/08
to plan9c...@googlegroups.com
Created May 10 14:44 by none
Processed May 10 20:44 by geoff

don't modify the exit status in fn sigexit; if we leave it alone the
correct status will come through. if we modify it, lookman in
rc always prints that ugly status message.

NOTES:
Sat May 10 14:43:30 EDT 2008 geoff
not quite right; notes should cause bad exit status.
applied a variant.


--
/rc/bin/lookman
lookman.orig:6,17 - /n/sources/patch/applied/lookmanexit/lookman:6,16
t2=/tmp/look2.$pid
fn sigexit sigint sighup sigterm{
rm -f $t1 $t2
- exit 1
}
*=`{echo $*|tr A-Z a-z|tr -dc 'a-z0-9_. \012'} # fold case, delete funny chars
if(~ $#* 0){
echo Usage: lookman key ... >/fd/2
- exit 1
+ exit usage
}
look $1 $index|sed 's/.* //'|sort -u >$t1
shift
lookman.orig:26,30 - /n/sources/patch/applied/lookmanexit/lookman:25,28
}
sort $t1 | sed 's;/sys/man/;;
s;(.*)/(.*);man \1 \2 # \2(\1);'
- rm -f $t1 $t2
- exit 0
+ exit ''

Reply all
Reply to author
Forward
0 new messages