commit - dd4afdf4eb411c2899f792cb11380877af065b1d
commit + dc305d03681e150b97acf4631a514868acd4b276
blob - 3fea275cafad3780f5c36053e268cf5a9c214d78
blob + eadf4d89a069fff8c0f30df04d332f97f2fc3b21
--- bin/9l
+++ bin/9l
;;
esac
done
+ case "${SYSVERSION:-`uname -r`}" in
+ 5.[67])
+ echo do not know how to link right thread library on "$tag" 1>&2
+ ;;
+ 5.8)
+ # Some trickery is needed to force use of
+ # alternate thread lib from /usr/lib/lwp
+ # Likely, this only works with sun cc,
+ # for other compiler/loader we would need other flags.
+ ld="$ld -i"
+ extralibs="$extralibs /usr/lib/lwp/libthread.so -R/usr/lib/lwp:/usr/lib"
+ ;;
+ esac
;;
*)
echo do not know how to link on "$tag" 1>&2
blob - ba3039a6731d70d043db105b7be56f0aec0c5da5
blob + 97cae2dc040403e9c9c19559069eb099dbde0f3f
--- src/cmd/9term/SunOS.c
+++ src/cmd/9term/SunOS.c
int
getpts(int fd[], char *slave)
{
+ void (*f)(int);
+ int r;
+
fd[1] = open("/dev/ptmx", ORDWR);
- if ((grantpt(fd[1]) < 0) || (unlockpt(fd[1]) < 0))
+ f = signal(SIGCLD, SIG_DFL);
+ r = grantpt(fd[1]);
+ signal(SIGCLD, f);
+ if(r < 0 || unlockpt(fd[1]) < 0)
return -1;
fchmod(fd[1], 0622);