From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1693 invoked from network); 12 Nov 1997 13:33:44 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 Nov 1997 13:33:44 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id IAA03878; Wed, 12 Nov 1997 08:28:19 -0500 (EST) Resent-Date: Wed, 12 Nov 1997 08:28:19 -0500 (EST) From: Anthony Heading Message-Id: <199711121322.NAA09473@gmp-etpres1.uk.jpmorgan.com> Subject: Bizarre Solaris problem To: zsh-workers@math.gatech.edu Date: Wed, 12 Nov 1997 13:22:44 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"IdKcw3.0.Xy.pxQQq"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3607 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu This has me perplexed. I have a small program, attached below, which does little more than a gethostbyname() call. I compile it *statically* under SunOS 4.1.3, using either acc or gcc, and attempt to run it under Solaris 2.5.1. It works OK for any standard /bin/sh or /bin/csh login. If however I use an account with /usr/local/bin/zsh (3.0.5) as the login (/etc/passwd) shell, it hangs in the gethostbyname() call. Further investigation using subshells from a /bin/csh login reveals: su : OK zsh -l : OK su - : hangs Having got into a "hang" configuration, su - *doesn't* reverse back into a working state. Those four pieces of evidence seem to rule out the problem as being in the environment or the zlogin file? Other info: I'm unaware of anything needed to "authorize" zsh (a la e.g. /etc/shells under some BSD-like environments). Vanilla 3.0.5 compilation (except for my vared patch sent to the list a week or two ago). Nothing in zlogin except for an stty config line. Where does one start looking here? Anthony --------- #include #include #include #include int main(int argc, char *argv[]) { struct hostent *m; unsigned char *a; if (argc < 2) { fprintf(stderr, "usage: %s \n", argv[0]); exit(1); } m=gethostbyname(argv[1]); if (!m || !m->h_addr_list || !m->h_addr_list[0]) { fprintf(stderr, "No such host %s\n", argv[1]); exit(1); } a = (unsigned char *)m->h_addr_list[0]; fprintf(stderr, "%d.%d.%d.%d\n", a[0], a[1], a[2], a[3]); return 0; }