This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bsd sockets question


In gmane.os.ecos.general, you wrote:

> My application has two threads. One thread is waiting on
> receiving data on a socket using the select function, with a
> timeout of forever.
>
> The other thread calls close on that socket.
>
> I was hoping that upon calling close the select function would
> return with an error. Instead it continues to block. This
> thread works on linux and windows so I was hoping it was
> standard BSD sockets functionality.
>
> Should this be working or does eCos not support this? If it
> doesn't support it does anyone have any ideas how to implement
> it, or even where to start?

One possible work-around is to call select_with_abort() instead
of select().  Then when you want to shutdown, call close() and
then cyg_select_abort().

-- 
Grant Edwards                   grante             Yow!  Is this ANYWHERE,
                                  at               USA?
                               visi.com            

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]