auth/factotum: fix password prompt hang with secstore
R=rsc
http://codereview.appspot.com/6906057
diff --git a/src/cmd/auth/factotum/main.c b/src/cmd/auth/factotum/main.c
index 2cf3966..1f603ac 100644
--- a/src/cmd/auth/factotum/main.c
+++ b/src/cmd/auth/factotum/main.c
@@ -70,8 +70,6 @@
if(argc != 0)
usage();
- rfork(RFNOTEG);
-
if(trysecstore && havesecstore()){
while(secstorefetch() < 0){
rerrstr(err, sizeof err);
@@ -81,7 +79,9 @@
fprint(2, "Enter an empty password to quit.\n");
}
}
-
+
+ rfork(RFNOTEG);
+
fsinit0();
threadpostmountsrv(&fs, service, mtpt, MBEFORE);
threadexits(nil);