zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: <cgf@redhat.com>, <zsh-workers@sunsite.auc.dk>
Subject: RE: Bug in cygwin with select and master pty
Date: Mon, 13 Nov 2000 14:12:50 +0300	[thread overview]
Message-ID: <000001c04d62$a8d72660$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <20001112151935.A19351@ohreally.bosbc.com>



> -----Original Message-----
> From: cgf@redhat.com [mailto:cgf@redhat.com]
> Sent: Sunday, November 12, 2000 11:20 PM
> To: zsh-workers@sunsite.auc.dk
> Subject: Re: Bug in cygwin with select and master pty
>
>
> In article <001e01c049b7$7f159ea0$21c9ca95@mow.siemens.ru>,
> Andrej Borsenkow <Andrej.Borsenkow@mow.siemens.ru> wrote:
> >> } About select - so far there seems to be no known problems under cygwin
> >> } (that does not mean, there are no problems).
> >>
> >>OK, if there are no known problems with select, then the test on line
> >>1376 can change from `ret <= 0' to `ret < 0' -- and in that case it's
> >>possible that we could split read_poll() into two cases, HAVE_SELECT v.
> >>all the other code that's there.  I won't do that for now, though.
> >
> >Life is fun.  5 minutes later I discovered a bug that made blocking
> >multiline reads (with or without pattern) hang at the end of the first
> >line.  I sent sort of a patch to cygwin list, but I am not sure if it
> >really does the right thing (it fixed the bug I've seen, O.K.  The
> >question is whether it introduced another bugs :-)
>
> I didn't see any followup to this but the new (1.1.5) release of cygwin
> should not have this problem.
>

Chris, are you hearing on this list too?

> >Anyway, fiddling with currently released versions of cygwin is pretty
> >useless wrt to zpty (all of them are buggy in some way).  Unfortunately
> >(to us) zsh seems to be the only program that has these problems.  With
> >all implications.
>
> Have all of these problems been reported to the cygwin mailing list?  Are
> there still problems in 1.1.5?
>

Yes. Build problem with termcap, EOF problem with pty, one more problem in
pre-1.1.5 snapshots and the above select problem.

The select problem is not fixed in 1.1.5-6.

> >The pgrp problem still remains.
>
> What is the pgrp problem?  Was this reported to the cygwin mailing list?
>

Some zpty code was changed and now zsh cannot attach to allocated pty (with
error message cannot set pgrp). No, this was not reported to cygwin list
because

- the problem resulted from zsh code change, so I first had to make sure it
was cygwin problem
- I have had enough "this is open source" replies. I'm sorry to say, but
reporting anything to cygwin list is pretty useless unless one can either
provide a patch or two-line program to reproduce the problem. I currently
cannot do either.

If you do not mind to update zsh CVS, you can see the last problem. Just do
something like

zmodload zsh/zpty
zpty sh /bin/sh

and now we have:

mw1g017@MW1G17C% zmodload zsh/zpty
mw1g017@MW1G17C% zpty sh /bin/sh
mw1g017@MW1G17C% ps -l
      PID    PPID    PGID     WINPID TTY  UID    STIME COMMAND
     1592       1    1592       1592   0 1006 14:05:53 /usr/bin/zsh
     1596    1592    1596       1596  -1 1006 14:06:14 /usr/bin/zsh
     1620    1592    1620       1624   0 1006 14:06:33 /usr/bin/ps

where provess 1596 is a child that tried to attach to allocated pty. If you
read the output you get:

mw1g017@MW1G17C% zpty -r sh foo \*$'\n'
mw1g017@MW1G17C% print -r $foo
zsh: can't set tty pgrp: not owner

This did work before last change; the main change was that zsh now opens both
master and slave fd's of pty with O_NOCTTY. This works on Unix.

-andrej


  reply	other threads:[~2000-11-13 11:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-12 20:19 cgf
2000-11-13 11:12 ` Andrej Borsenkow [this message]
2000-11-13 16:21   ` Chris Faylor
2000-11-13 16:59     ` Andrej Borsenkow
  -- strict thread matches above, loose matches on Subject: below --
2000-11-08 15:58 PATCH: read_poll Re: PATCH: Zpty cleanup (merge 13061 with 13116) Bart Schaefer
2000-11-08 19:10 ` Bug in cygwin with select and master pty Andrej Borsenkow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c04d62$a8d72660$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=cgf@redhat.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).