tMore debugging; do not use /dev/tty explicitly. - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 78b5635d698a1d278fade51856e51520046261fc
parent 3ae1a866feb2dcaa31877ddb924687eea6c58ec4
Author: rsc 
Date:   Thu, 24 Mar 2005 05:45:01 +0000

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

Diffstat:
  M src/cmd/netfiles/main.c             |       4 ++++
  M src/cmd/netfiles/netfilelib.rc      |       3 +--

2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/cmd/netfiles/main.c b/src/cmd/netfiles/main.c
t@@ -231,6 +231,7 @@ plumbthread(void *v)
         CFid *fid;
         Plumbmsg *m;
         
+        threadsetname("plumbthread");
         fid = plumbopenfid("netfileedit", OREAD);
         if(fid == nil){
                 fprint(2, "cannot open plumb/netfileedit: %r\n");
t@@ -521,6 +522,7 @@ loopthread(void *v)
 {
         QLock lk;
         
+        threadsetname("loopthread");
         qlock(&lk);
         qlock(&lk);
 }
t@@ -542,6 +544,8 @@ threadmain(int argc, char **argv)
         if(argc)
                 usage();
 
+        cprint("netfiles starting\n");
+
         threadnotify(nil, 0);        /* set up correct default handlers */
 
         fmtinstall('E', eventfmt);
diff --git a/src/cmd/netfiles/netfilelib.rc b/src/cmd/netfiles/netfilelib.rc
t@@ -13,7 +13,7 @@ fn runsftp {
                 shift
         }
         if(! [2]/dev/null){
-                sftpcache -D $1 >/dev/tty
+                sftpcache -D $1 [1=2]
         }
         {
                 if(! [2]/dev/null){
t@@ -23,7 +23,6 @@ fn runsftp {
                         {cat; echo DONE} | dial -e 'unix!'^$ns/$1.sftp
                 }
         } >$t.sftp1 >[2=1]
-        sed 's/^/1 /' $t.sftp1
         sed '/^sftp> /d
                 /^Connecting to /d
                 /^Fetching /d