Thread (3 messages) flat view 3 messages, 3 authors, 2007-02-02

ELDK glibc fcntl(socketFd,F_SETFL, flags) causes Seg Fault

From: Daniel Ng <hidden>
Date: 2007-02-01 23:08:25

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help