From: Daniel Ng <daniel_ng11@lycos•com>
To: linuxppc-embedded@ozlabs•org
Subject: ELDK glibc fcntl(socketFd, F_SETFL, flags) causes Seg Fault
Date: Thu, 1 Feb 2007 06:56:43 +0000 (UTC) [thread overview]
Message-ID: <loom.20070201T073939-302@post.gmane.org> (raw)
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
next reply other threads:[~2007-02-01 23:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-01 6:56 Daniel Ng [this message]
2007-02-02 7:30 ` ELDK glibc fcntl(socketFd, F_SETFL, flags) causes Seg Fault 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
[not found] <mailman.1565.1170401421.9285.linuxppc-embedded@ozlabs.org>
2007-02-02 14:10 ` Christopher Dumoulin
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=loom.20070201T073939-302@post.gmane.org \
--to=daniel_ng11@lycos$(echo .)com \
--cc=linuxppc-embedded@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox