auth/factotum: fix password prompt hang

Fixes #51.

R=rsc
http://codereview.appspot.com/3431044
This commit is contained in:
Russ Cox 2010-12-07 13:17:27 -05:00
parent 00f0146a5c
commit d10a7ed9a8

View file

@ -26,8 +26,6 @@ threadmain(int argc, char *argv[])
char *mtpt; char *mtpt;
char err[ERRMAX]; char err[ERRMAX];
rfork(RFNOTEG);
/* mtpt = "/mnt"; */ /* mtpt = "/mnt"; */
mtpt = nil; mtpt = nil;
owner = getuser(); owner = getuser();
@ -72,6 +70,8 @@ threadmain(int argc, char *argv[])
if(argc != 0) if(argc != 0)
usage(); usage();
rfork(RFNOTEG);
if(trysecstore && havesecstore()){ if(trysecstore && havesecstore()){
while(secstorefetch() < 0){ while(secstorefetch() < 0){
rerrstr(err, sizeof err); rerrstr(err, sizeof err);