zsh-workers
 help / color / mirror / code / Atom feed
From: Anthony Heading <aheading@jpmorgan.com>
To: zsh-workers@math.gatech.edu
Subject: Bizarre Solaris problem
Date: Wed, 12 Nov 1997 13:22:44 +0000 (GMT)	[thread overview]
Message-ID: <199711121322.NAA09473@gmp-etpres1.uk.jpmorgan.com> (raw)

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 <zsh> : OK
zsh -l : OK
su - <zsh> : hangs

Having got into a "hang" configuration, su - <csh> *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 <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>

int main(int argc, char *argv[])
{
  struct hostent *m;
  unsigned char *a;

  if (argc < 2) {
    fprintf(stderr, "usage: %s <hostname>\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;
}


             reply	other threads:[~1997-11-12 13:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-12 13:22 Anthony Heading [this message]
1997-11-12 17:45 ` Bart Schaefer
1997-11-13 17:17   ` Anthony Heading
1997-11-13 18:55     ` Richard Coleman
1997-11-14 14:15     ` Peter Stephenson
1997-11-20 15:18       ` Anthony Heading

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=199711121322.NAA09473@gmp-etpres1.uk.jpmorgan.com \
    --to=aheading@jpmorgan.com \
    --cc=zsh-workers@math.gatech.edu \
    /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).