unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: pcl-cvs help
       [not found]     ` <200301240123.h0O1NK022670@champion.sslsecure.com>
@ 2003-01-27 17:39       ` Stefan Monnier
  2003-01-27 19:16         ` Jim Hourihan
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2003-01-27 17:39 UTC (permalink / raw)
  Cc: emacs-devel

> > Please double and triple check.  For example, open up a *cvs* buffer (to
> > make sure that PCL-CVS gets loaded), then do C-x C-f .../pcvs.el RET and
> > the M-x eval-region RET and then try M-x cvs-status (aka M-u) a few times
> > to see if the problem is still present.  It's very easy to end up loading
> > a stray unmodified file: even long-time Emacs maintainers routinely do it
> > even after "double checking".
> 
> Ok, I double checked and was able to actually pick up the change; I'm not
> sure what happened before. Anyway, on Linux, the problem is gone. On OS X,
> the problem is much less noticable, but still there. 

So there's something else at play.  Could any Max OS X guy lok at this ?

> I'm guessing that the problem is now related to a problem that also shows
> up in eshell on OS X: the output of a process is sometimes cut short.

So it might be a bug in Emacs' handling of async processes ?

> Once again its only happening on OS X now and the problem "looks different"
> than it did before.
> 
> > The problem that the patch above is trying to fix is not specific to
> > Emacs at all, but to a combination of "CVS + SSH + some libc + stdout and
> > stderr outputting to a pipe".  It's a pretty "obscure" interaction
> > and the jury is still out about who is to blame.
> >
> > I can easily reproduce it outside of Emacs on my Linux box as follows:
> >
> > 	src/m-0% cvs status -v 2>&1 | wc  
> > 	   4724   13182  187152
> > 	src/m-0% cvs status -v 2>&1 | (sleep 10; wc)
> > 	    151     417    5828
> > 	src/m-0% 
> 
> It happens on OS X too:
> 
>     bash-2.05a$ cvs status -v 2>&1 | wc
>          618    1340   17113 
>     bash-2.05a$ cvs status -v 2>&1 | (sleep 10; wc)
>          319     693    8853 
>     bash-2.05a$ 
> 
> and on my Linux box:
> 
>     bash-2.05$ cvs status -v 2>&1 | wc
> 	626    1360   17307
>     bash-2.05$ cvs status -v 2>&1 | (sleep 10; wc)
> 	 34      74     818
>     bash-2.05$ 

Thank you for testing it.  I suggested you report the above problem
to the Mac OS X people (with a CC to the CVS people and the SSH people.
BTW, which SSH do you use ?).

> <#part type="application/octet-stream" filename="~/x" disposition=attachment description="cvs-tmp buffer">

Looks like something didn't work ;-)


	Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-27 17:39       ` pcl-cvs help Stefan Monnier
@ 2003-01-27 19:16         ` Jim Hourihan
  2003-01-27 23:43           ` David Caldwell
  0 siblings, 1 reply; 10+ messages in thread
From: Jim Hourihan @ 2003-01-27 19:16 UTC (permalink / raw)
  Cc: emacs-devel

"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

> Thank you for testing it.  I suggested you report the above problem
> to the Mac OS X people (with a CC to the CVS people and the SSH people.
> BTW, which SSH do you use ?).

No problem.

Linux CVS version: 1.11.2
OS X CVS version:  1.11.2 (same problems with shipped 1.10 CVS version)

uname -a (osx):

    Darwin corn 6.3 Darwin Kernel Version 6.3: Sat Dec 14 03:11:25 PST
    2002; root:xnu/xnu-344.23.obj~4/RELEASE_PPC Power Macintosh powerpc

OS X Emacs (compiled by me): 

    GNU Emacs 21.2.1 (powerpc-apple-darwin, X toolkit)

The OS X dropped process ouput problem is also exhibited by the nox emacs
shipped with OS X. The easiest way to see it is try something like "df" in
eshell (it usually outputs nothing). I have not seen this behavior on any
other unix-ish software on OS X. 

   -Jim

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-27 19:16         ` Jim Hourihan
@ 2003-01-27 23:43           ` David Caldwell
  2003-01-28  0:14             ` Andrew Choi
  2003-01-29  6:36             ` Richard Stallman
  0 siblings, 2 replies; 10+ messages in thread
From: David Caldwell @ 2003-01-27 23:43 UTC (permalink / raw)


On 01/27/03 11:16:52 -0800 Jim Hourihan wrote:

> The OS X dropped process ouput problem is also exhibited by the nox emacs
> shipped with OS X. The easiest way to see it is try something like "df" in
> eshell (it usually outputs nothing). I have not seen this behavior on any
> other unix-ish software on OS X.

This seemed to eliminate the problem for me (from Andrew's FAQ):

(setq process-connection-type nil)

-David

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-27 23:43           ` David Caldwell
@ 2003-01-28  0:14             ` Andrew Choi
  2003-01-28 17:26               ` Stefan Monnier
  2003-01-29  6:36             ` Richard Stallman
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Choi @ 2003-01-28  0:14 UTC (permalink / raw)


David Caldwell <david@porkrind.org> writes:

> This seemed to eliminate the problem for me (from Andrew's FAQ):
> 
> (setq process-connection-type nil)

There is a problem with the implementation of ptys on the Mac OS X.
That was why I set process-connection-type to nil by default in
lisp/term/mac-win.el.  At some point, this was conditioned out without
my knowledge.  If no one can provide a good reason for doing this, I
propose to change it back the way it was.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-28  0:14             ` Andrew Choi
@ 2003-01-28 17:26               ` Stefan Monnier
  2003-01-28 19:28                 ` Jim Hourihan
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2003-01-28 17:26 UTC (permalink / raw)
  Cc: emacs-devel

> David Caldwell <david@porkrind.org> writes:
> 
> > This seemed to eliminate the problem for me (from Andrew's FAQ):
> > 
> > (setq process-connection-type nil)
> 
> There is a problem with the implementation of ptys on the Mac OS X.
> That was why I set process-connection-type to nil by default in
> lisp/term/mac-win.el.  At some point, this was conditioned out without
> my knowledge.  If no one can provide a good reason for doing this, I
> propose to change it back the way it was.

Hmmmm so if CVS' output is a pipe, PCL-CVS hits the CVS+SSH+libc+pipe problem
and if it's a pty, it hits the other problem.

IIRC, one way to get things working is to use a pipe (as it should,
and as it was doing in Emacs-21.2) and to set CVS_RSH not to `ssh'
but to a script like

	#!/bin/sh
	(ssh "$@" 2>&1 1>&3 | cat) 3>&1 1>&2

that runs ssh's stderr through `cat'.  Jim, can you try that ?


	Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-28 17:26               ` Stefan Monnier
@ 2003-01-28 19:28                 ` Jim Hourihan
  0 siblings, 0 replies; 10+ messages in thread
From: Jim Hourihan @ 2003-01-28 19:28 UTC (permalink / raw)
  Cc: emacs-devel

"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

>> David Caldwell <david@porkrind.org> writes:
>> 
>> > This seemed to eliminate the problem for me (from Andrew's FAQ):
>> > 
>> > (setq process-connection-type nil)
>> 
>> There is a problem with the implementation of ptys on the Mac OS X.
>> That was why I set process-connection-type to nil by default in
>> lisp/term/mac-win.el.  At some point, this was conditioned out without
>> my knowledge.  If no one can provide a good reason for doing this, I
>> propose to change it back the way it was.
>
> Hmmmm so if CVS' output is a pipe, PCL-CVS hits the CVS+SSH+libc+pipe problem
> and if it's a pty, it hits the other problem.
>
> IIRC, one way to get things working is to use a pipe (as it should,
> and as it was doing in Emacs-21.2) and to set CVS_RSH not to `ssh'
> but to a script like
>
> 	#!/bin/sh
> 	(ssh "$@" 2>&1 1>&3 | cat) 3>&1 1>&2
>
> that runs ssh's stderr through `cat'.  Jim, can you try that ?

It works! Both OS X and Linux are now working flawlessly (fingers
crossed). Thank god too because this has been driving me nuts! I reverted
the pcvs.el file to its shipped state by uncommenting out this line in
cvs-run-process:

          (process-connection-type nil) 

That fixed the problem. I tried cvs-status on our entire source tree and it
worked. If something goes wrong with it I'll know in the next couple of
days. 

          -Jim

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-27 23:43           ` David Caldwell
  2003-01-28  0:14             ` Andrew Choi
@ 2003-01-29  6:36             ` Richard Stallman
  2003-01-29  7:05               ` Andrew Choi
  1 sibling, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2003-01-29  6:36 UTC (permalink / raw)
  Cc: emacs-devel

    > The OS X dropped process ouput problem is also exhibited by the nox emacs
    > shipped with OS X. The easiest way to see it is try something like "df" in
    > eshell (it usually outputs nothing). I have not seen this behavior on any
    > other unix-ish software on OS X.

    This seemed to eliminate the problem for me (from Andrew's FAQ):

    (setq process-connection-type nil)

This could be a good work-around, but it would be better
if we could fix the underlying Emacs code to make this unnecessary.
However, that would depend on someone who works on Emacs on Mac OS
to figure out the right fix.

Andrew Choi wrote:

    There is a problem with the implementation of ptys on the Mac OS X.
    That was why I set process-connection-type to nil by default in
    lisp/term/mac-win.el.

It's better to do this in Emacs than to advise every user to do it.
Is this a bug in ptys such that Emacs can't make them work,
or is it a bug in Emacs's pty support that could theoretically be
fixed in Emacs?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-29  6:36             ` Richard Stallman
@ 2003-01-29  7:05               ` Andrew Choi
  2003-01-30 15:20                 ` Richard Stallman
  0 siblings, 1 reply; 10+ messages in thread
From: Andrew Choi @ 2003-01-29  7:05 UTC (permalink / raw)
  Cc: David Caldwell

Richard Stallman <rms@gnu.org> writes:

> Andrew Choi wrote:
> 
>     There is a problem with the implementation of ptys on the Mac OS X.
>     That was why I set process-connection-type to nil by default in
>     lisp/term/mac-win.el.
> 
> It's better to do this in Emacs than to advise every user to do it.
> Is this a bug in ptys such that Emacs can't make them work,
> or is it a bug in Emacs's pty support that could theoretically be
> fixed in Emacs?

I believe there is a bug in Mac OS X's implementation of ptys that
causes characters to be lost.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-29  7:05               ` Andrew Choi
@ 2003-01-30 15:20                 ` Richard Stallman
  2003-01-30 15:54                   ` Andrew Choi
  0 siblings, 1 reply; 10+ messages in thread
From: Richard Stallman @ 2003-01-30 15:20 UTC (permalink / raw)
  Cc: david

    I believe there is a bug in Mac OS X's implementation of ptys that
    causes characters to be lost.

Could you add a comment to that effect next to the setq?
That will help prevent confusion later.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: pcl-cvs help
  2003-01-30 15:20                 ` Richard Stallman
@ 2003-01-30 15:54                   ` Andrew Choi
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Choi @ 2003-01-30 15:54 UTC (permalink / raw)
  Cc: david

Richard Stallman <rms@gnu.org> writes:

>     I believe there is a bug in Mac OS X's implementation of ptys that
>     causes characters to be lost.
> 
> Could you add a comment to that effect next to the setq?
> That will help prevent confusion later.

A comment has been there all along.

  ;; Tell Emacs to use pipes instead of pty's for processes because the
  ;; latter sometimes lose characters.  Pty support is compiled in since
  ;; ange-ftp will not work without it.
  (setq process-connection-type nil))

Perhaps I will add an item to etc/PROBLEMS.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-01-30 15:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <m28yxbd69c.fsf@corn.tweak.local>
     [not found] ` <5l65sfa2t2.fsf@rum.cs.yale.edu>
     [not found]   ` <200301232349.h0NNnWo09694@rum.cs.yale.edu>
     [not found]     ` <200301240123.h0O1NK022670@champion.sslsecure.com>
2003-01-27 17:39       ` pcl-cvs help Stefan Monnier
2003-01-27 19:16         ` Jim Hourihan
2003-01-27 23:43           ` David Caldwell
2003-01-28  0:14             ` Andrew Choi
2003-01-28 17:26               ` Stefan Monnier
2003-01-28 19:28                 ` Jim Hourihan
2003-01-29  6:36             ` Richard Stallman
2003-01-29  7:05               ` Andrew Choi
2003-01-30 15:20                 ` Richard Stallman
2003-01-30 15:54                   ` Andrew Choi

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).