delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/15/15:29:06

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_73,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20090615184059.GC23085@ednor.casa.cgf.cx>
References: <7c6dcbb9c797277cc8ffb1fc985844af AT mail DOT smartmobili DOT com> <416096c60906151139n45e0d967n8abee104fe194867 AT mail DOT gmail DOT com> <20090615184059 DOT GC23085 AT ednor DOT casa DOT cgf DOT cx>
Date: Mon, 15 Jun 2009 20:28:47 +0100
Message-ID: <416096c60906151228l19d8c458i9218708e7c7cf3cd@mail.gmail.com>
Subject: Re: Optimize cygwin on recent windows version (Vista and Seven)
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

2009/6/15 Christopher Faylor:
>>One issue that I've noticed on Windows 7, both with Cygwin 1.5 and
>>1.7, is that trying to log a utmp entry when starting a terminal can
>>take up to half a minute, presumably due to waiting for some sort of
>>timeout.
>
> Sorry but this isn't a much more useful report.

You're right, sorry. Here's how I got it: repeatedly invoke rxvt,
xterm, or 'mintty -u'. The first invocation would usually be fine, but
subsequent invocations would hang for something like half a minute.

When disabling the utmp entry, using 'rxvt -ut', 'xterm -ut', or
mintty without -u, there'd be no delay.

In MinTTY, the -u option activates the following bit of code. fd is
the master side of its pseudo terminal:

static struct utmp ut;
...
      ut.ut_type = USER_PROCESS;
      ut.ut_pid = pid;
      ut.ut_time = time(0);
      char *dev = ptsname(fd);
      if (dev) {
        if (strncmp(dev, "/dev/", 5) == 0)
          dev += 5;
        strncpy(ut.ut_line, dev ?: "?", sizeof ut.ut_line);
        if (strncmp(dev, "pty", 3) == 0 || strncmp(dev, "tty", 3) == 0)
          dev += 3;
        strncpy(ut.ut_id, dev ?: "?", sizeof ut.ut_id);
      }
      strncpy(ut.ut_user, (pw ? pw->pw_name : 0) ?: "?", sizeof ut.ut_user);
      login(&ut);

Unfortunately my Windows 7 machine went belly-up, so I can't look into
this further at the moment.

Andy

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019