More debugging; do not use /dev/tty explicitly.

This commit is contained in:
rsc 2005-03-24 05:45:01 +00:00
parent 3ae1a866fe
commit 78b5635d69
2 changed files with 5 additions and 2 deletions

View file

@ -231,6 +231,7 @@ plumbthread(void *v)
CFid *fid; CFid *fid;
Plumbmsg *m; Plumbmsg *m;
threadsetname("plumbthread");
fid = plumbopenfid("netfileedit", OREAD); fid = plumbopenfid("netfileedit", OREAD);
if(fid == nil){ if(fid == nil){
fprint(2, "cannot open plumb/netfileedit: %r\n"); fprint(2, "cannot open plumb/netfileedit: %r\n");
@ -521,6 +522,7 @@ loopthread(void *v)
{ {
QLock lk; QLock lk;
threadsetname("loopthread");
qlock(&lk); qlock(&lk);
qlock(&lk); qlock(&lk);
} }
@ -542,6 +544,8 @@ threadmain(int argc, char **argv)
if(argc) if(argc)
usage(); usage();
cprint("netfiles starting\n");
threadnotify(nil, 0); /* set up correct default handlers */ threadnotify(nil, 0); /* set up correct default handlers */
fmtinstall('E', eventfmt); fmtinstall('E', eventfmt);

View file

@ -13,7 +13,7 @@ fn runsftp {
shift shift
} }
if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){ if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){
sftpcache -D $1 >/dev/tty sftpcache -D $1 </dev/null >[1=2]
} }
{ {
if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){ if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){
@ -23,7 +23,6 @@ fn runsftp {
{cat; echo DONE} | dial -e 'unix!'^$ns/$1.sftp {cat; echo DONE} | dial -e 'unix!'^$ns/$1.sftp
} }
} >$t.sftp1 >[2=1] } >$t.sftp1 >[2=1]
sed 's/^/1 /' $t.sftp1
sed '/^sftp> /d sed '/^sftp> /d
/^Connecting to /d /^Connecting to /d
/^Fetching /d /^Fetching /d