zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: zsh-users@sunsite.dk
Subject: Re: zsh compiling on Apple OSX v. 10.4.x
Date: Thu, 19 May 2005 10:33:26 +0100	[thread overview]
Message-ID: <29834.1116495206@csr.com> (raw)
In-Reply-To: Message from William Scott <wgscott@chemistry.ucsc.edu>  of "Thu, 19 May 2005 00:02:36 PDT." <294439D0-476D-43F3-8326-8209C1F3FE9C@chemistry.ucsc.edu>

William Scott wrote:
> When I tried compiling zsh on OSX v. 10.4, I found that the resulting  
> zsh, when invoked, did not appear to respond to arrow keys, back- 
> spaces and so-forth (I say "appear" because apparently it just  
> doesn't update the terminal display).  Following Apple's patch, I  
> configured and then edited the file config.h to remove the lines
> 
> 
>      391 /* Define to 1 if you have the `poll' function. */
>      392 /* #define HAVE_POLL 1 */
>      393
>      394 /* Define to 1 if you have the <poll.h> header file. */
>      395 /* #define HAVE_POLL_H 1 */
> 
> Then compiled and installed and the problem went away.
> 
> However, I have two questions:
> 
> 1.  What did I do, and is it harmful?

There are various ways for the shell to wait for input, in particular
a key press, without using CPU time while it does so.  The poll()
system call is one.  Chances are that your system also has the
select() system call, in which case when you comment out the lines above
zsh will use that instead.  (You could check for HAVE_SELECT in
config.h.)  As long as keyboard input is working the shell must be happy;
if removing poll() had done anything harmful, you'd certainly know by now.

> 2.  When root uses zsh (either the one I compiled or the one Apple  
> provided) the problem returns.  What's going on with that?

The possibilities are (i) some shell option is different, which you can
check by running in both cases without initilisation files (ii) something
in the environment is different, the TERM variable being an obvious
possibility (or TERMCAP, or TERMINFO) (iii) there are a different set
of dynamic libraries in use as root (iv) different STREAMS modules
have been pushed onto the terminal I/O stream; we had problems with the
zpty module owing to STREAMS weirdness (sorry if this sounds rather opaque,
it's rather opaque to me too) (v) something I haven't thought of.  It's
hard to guess.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************


  parent reply	other threads:[~2005-05-19  9:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-19  7:02 William Scott
     [not found] ` <wgscott@chemistry.ucsc.edu>
2005-05-19  9:33   ` Peter Stephenson [this message]
2005-05-19 14:03     ` William Scott
2005-05-23  7:23 ` Felix Rosencrantz

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=29834.1116495206@csr.com \
    --to=pws@csr.com \
    --cc=zsh-users@sunsite.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).