Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.
"Tony Hoyle" <tmh at nothing-on.tv> wrote in message news:3d0dce2f.853584656 at news.cvsnt.org... > On Mon, 17 Jun 2002 10:26:20 +0000 (UTC), "Anthony Williams" > <anthwil at nortelnetworks.com> wrote: > > > >run_exec (from src/run.c) starts the process, but determines its > >finished-ness by the availability or not of output on stdout and stderr, > >rather than using wait or waitpid. This means that if an editor such as > >gnuclient is used which has minimal output, then cvs assumes the program has > >finished before emacs has even loaded the file to edit. > > > It's actually based on whether the remote end has closed the > connection or not. If the program is running but just not producing > output the read will return 0, and if it's terminated (closing the > standard pipes) the read returns -1. It's basically the same code > that used to be in server.c. I don't think you can use wait() in this > case as you have to feed the output from the program through the > cvs_stdout and cvs_stderr functions. OK, well gnuclient must close the pipes then, because as it stands, run_exec thinks that the process has terminated, yet xemacs still has only just opened the file, and the gnuclient process is still running. Adding a waitpid just before the return in run_exec then works correctly --- you can even pick up the error code to return to the caller, so when (e.g.) vi exits immediately with an error (as it does), this is picked up. Anyway, vi doesn't work either, and I can only assume that it _does_ work with Standard CVS (since it would be a major problem if it didn't). Anthony -- Anthony Williams Software Engineer, Nortel Networks Optical Components Ltd The opinions expressed in this message are not necessarily those of my employer _______________________________________________ Cvsnt mailing list Cvsnt at cvsnt.org http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs