zsh-workers
 help / color / mirror / code / Atom feed
* Bizarre Solaris problem
@ 1997-11-12 13:22 Anthony Heading
  1997-11-12 17:45 ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Anthony Heading @ 1997-11-12 13:22 UTC (permalink / raw)
  To: zsh-workers

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;
}


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

end of thread, other threads:[~1997-11-20 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-12 13:22 Bizarre Solaris problem Anthony Heading
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

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