linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ELDK glibc fcntl(socketFd, F_SETFL, flags) causes Seg Fault
@ 2007-02-01  6:56 Daniel Ng
  2007-02-02  7:30 ` Wolfgang Denk
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Ng @ 2007-02-01  6:56 UTC (permalink / raw)
  To: linuxppc-embedded

Hi,

My application Seg Faults when I try to set flags for my socket fd.

First, I get the fd by calling socket():
fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);

Then I try getting the fd flags:
fcntl(fd, F_GETFL, flags)

Then I try setting the flags:
flags |= O_NONBLOCK;
fcntl( fd, F_SETFL, flags );

-I get consistent Seg Faults on the last line above.

-I also checked fd, which is a sensible value. 
I can even successfully connect() with it.

-The problem happens regardless of what value 'flags' is set to


My embedded target details-

-powerpc8272
-ELDK v4
-the application uses glibc


Any ideas why I'm getting these Seg Faults?

Cheers,
Daniel

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

end of thread, other threads:[~2007-02-05  3:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1565.1170401421.9285.linuxppc-embedded@ozlabs.org>
2007-02-02 14:10 ` ELDK glibc fcntl(socketFd, F_SETFL, flags) causes Seg Fault Christopher Dumoulin
2007-02-01  6:56 Daniel Ng
2007-02-02  7:30 ` Wolfgang Denk
2007-02-05  3:11   ` Daniel Ng
2007-02-02 14:11 ` ELDK glibc fcntl(socketFd,F_SETFL, " Edward Jubenville
2007-02-02 15:03 ` ELDK glibc fcntl(socketFd, F_SETFL, " Magnus Hjorth

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