home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / sgi / misc / 79 < prev    next >
Encoding:
Text File  |  1992-12-23  |  2.0 KB  |  49 lines

  1. Newsgroups: comp.sys.sgi.misc
  2. Path: sparky!uunet!cs.utexas.edu!sun-barr!ames!sgi!twilight!zuni!anchor!olson
  3. From: olson@anchor.esd.sgi.com (Dave Olson)
  4. Subject: Re: Gethostbyname Error
  5. Message-ID: <tumomuk@zuni.esd.sgi.com>
  6. Sender: news@zuni.esd.sgi.com (Net News)
  7. Organization:  Silicon Graphics, Inc.  Mountain View, CA
  8. References: <1992Dec21.033141.15406@news2.cis.umn.edu> <ts526sg@zuni.esd.sgi.com> <1992Dec21.181140.21504@news2.cis.umn.edu>
  9. Date: Wed, 23 Dec 92 04:48:45 GMT
  10. Lines: 37
  11.  
  12. In <1992Dec21.181140.21504@news2.cis.umn.edu> coyle@mars.cs.umn.edu (Mark Stephan Coyle) writes:
  13. | *****Well I am glad I fit in with what Dave expects from a programmer (-:)
  14. | Thanks for the response.  As I said, the code works fine on other machines,
  15. | including Sparcs, Suns, and another SGI.  But on this machine, I get the following:
  16. | dbx a.out
  17. | dbx version 2.10 11/15/91 2:02
  18. | Type 'help' for help.
  19. | Reading symbolic information of `a.out' . . .
  20. | main:29   29  sock=socket(AF_INET,SOCK_DGRAM,0);
  21. | (dbx) run 2001
  22. | Interrupt
  23. | (dbx) run 2001
  24. | Process 14353 (a.out) started
  25. | Process 14353 (a.out) Segmentation fault [main:42 +0x8,0x4002d8]
  26. |   42  bcopy(hp->h_addr, &(server.sin_addr.s_addr),hp->h_length);
  27. | (dbx) where
  28. | >  0 main(argc = 2, argv = 0x7fffc784) ["/usr/people/coyle/devel/flight/Sockets/i_net_send.c":42, 0x4002d8]
  29. | Interstingly, and possibly connected, is what I get when I try to print
  30. | out some simple tracing commands using printf.  Note that I segment fault
  31. | if I do the gethostbyname call, and then use printf, even if I exit immediately after the printf call:
  32.  
  33. Your test program works fine for me, -O, and -g, on 3 different
  34. machines, with 3 different OS's and development releases...
  35.  
  36. That is whether the gethostbyname succeeds or fails (I tried
  37. both).
  38. --
  39. Let no one tell me that silence gives consent,  |   Dave Olson
  40. because whoever is silent dissents.             |   Silicon Graphics, Inc.
  41.     Maria Isabel Barreno                        |   olson@sgi.com
  42.