Closing a socket.
Joel Sherrill <joel@OARcorp.com>
joel.sherrill at OARcorp.com
Wed May 11 21:54:14 UTC 2005
Chris Johns wrote:
> Joel Sherrill <joel at OARcorp.com> wrote:
>
>>
>> read( on socket ) ends up blocked inside termios. This looks like
>> it ends on blocking on an rtems_semaphore_obtain, so I would expect
>> that the underlying semaphore would get deleted and you would wake up.
>>
>
> A socket read does not end up in termios, it ends up in a call in
> libnetworking/rtems_glue.c.
Grr.. so much to know and get right. Sorry.
> The issue is the structs accessed after the blocked thread wakes up.
But if the socket is closed, then shouldn't there be a path from the
blocking object going away which indicates an error occurred so
future references to freed resources can be avoided.
Where in rtems_glue.c are you looking?
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list