zsh-users
 help / color / mirror / code / Atom feed
* zsh compiling on Apple OSX v. 10.4.x
@ 2005-05-19  7:02 William Scott
       [not found] ` <wgscott@chemistry.ucsc.edu>
  2005-05-23  7:23 ` Felix Rosencrantz
  0 siblings, 2 replies; 4+ messages in thread
From: William Scott @ 2005-05-19  7:02 UTC (permalink / raw)
  To: zsh-users

Hi folks:

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?

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

Thanks.

Bill Scott


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

* Re: zsh compiling on Apple OSX v. 10.4.x
       [not found] ` <wgscott@chemistry.ucsc.edu>
@ 2005-05-19  9:33   ` Peter Stephenson
  2005-05-19 14:03     ` William Scott
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2005-05-19  9:33 UTC (permalink / raw)
  To: zsh-users

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.

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


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

* Re: zsh compiling on Apple OSX v. 10.4.x
  2005-05-19  9:33   ` Peter Stephenson
@ 2005-05-19 14:03     ` William Scott
  0 siblings, 0 replies; 4+ messages in thread
From: William Scott @ 2005-05-19 14:03 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: zsh-users

Dear Peter:

> (v) something I haven't thought of.  It's
> hard to guess.

Many thanks for the quick and thorough reply.  I'm afraid (v) applies --
I was invoking one of the broken binaries I had compiled.  Sorry.

As compensation for your time, I will invent a new term to describe the
author of my question:

"zluser"


Again, sorry.


Bill Scott


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

* Re: zsh compiling on Apple OSX v. 10.4.x
  2005-05-19  7:02 zsh compiling on Apple OSX v. 10.4.x William Scott
       [not found] ` <wgscott@chemistry.ucsc.edu>
@ 2005-05-23  7:23 ` Felix Rosencrantz
  1 sibling, 0 replies; 4+ messages in thread
From: Felix Rosencrantz @ 2005-05-23  7:23 UTC (permalink / raw)
  To: zsh-users

It wasn't clear to me from Bill's original question, that the folks at
Apple have made some mods to the zsh build to get it work on OSX 10.4.
 Here's the url for their Portfile:
http://cvs.opendarwin.org/index.cgi/proj/darwinports/dports/shells/zsh/

It seems that on 10.4, it's better to use select() than poll() for the
terminal IO. Otherwise you get the broken behavior Bill mentions.  
Though configure for zsh hasn't been modified to know this.  I'm not
sure how to modify the autoconfg code to change this code for 10.4. 
But it would be nice to fix this, so that zsh builds properly on OSX
10.4 w/o hand-edits to config.h.

-FR.

On 5/19/05, William Scott <wgscott@chemistry.ucsc.edu> 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.


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

end of thread, other threads:[~2005-05-23  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-19  7:02 zsh compiling on Apple OSX v. 10.4.x William Scott
     [not found] ` <wgscott@chemistry.ucsc.edu>
2005-05-19  9:33   ` Peter Stephenson
2005-05-19 14:03     ` William Scott
2005-05-23  7:23 ` Felix Rosencrantz

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).