On Mon, Aug 30, 2010 at 7:22 PM, Charles Forsyth <[email protected]> wrote: > in rcinputproc > s = setecho(sfd, 0); > if(write(rcfd, pair.s, pair.ns) < 0) > threadexitsall(nil); > if(s) > setecho(sfd, s); > > there's a race between setting echo off, writing to rcfd, resetting echo and > the reader of the other side of rcfd. a sleep(1) before if(s) makes it less > frequent > because the reader gets to read the data in the right mode. > i haven't really looked at what linux is doing that allows that, > or what changed between revisions. > > it's not my observation, it was on a list or issue comment somewhere, > presumably for p9p. i can't find the bookmark.
thanks for this. sleep(1) helped only rarely, sleep(10) helps most of the time. unfortunately then there's a race between the invoked program turning off echo and 9term turning it back on. so "sudo sh" is pretty likely to echo the password with the sleep in there. what a mess. russ
