[openbeos] Re: select() in BeOS ?
- From: Michael Phipps <mphipps1@xxxxxxxxxxxxxxxx>
- To: openbeos@xxxxxxxxxxxxx
- Date: Tue, 16 Mar 2004 18:28:38 -0500
It's sort of the right place, sort of not. :-)
The issue with select is that select() was designed to work on file
descriptors. In (say) Linux, a scoket is a file descriptor. So you could
select() on a file and a socket and it would work just fine. In BeOS, the
network kit was implemented in user land. That prohibits sockets from being
file descriptors (which are part of kernel land). Be's select, IIRC, works
only on network sockets. Never on files. There is no implementation of select
for files.
BONE is a new BeOS kernel that Be was working on. It contains a networking
stack in the kernel and, therefore, a "complete" select().
Now, for the on topic stuff:
Our (OBOS) networking stuff is in the kernel. We should have a "proper"
select.
I can't tell you if waiting for us is a good idea or not. :-D
Finally, I would guess that you are porting code. If you are not porting
code, there are alternatives in BeOS that work better than select for what
you want. Node Monitoring, for example.
On 2004-03-16 at 18:10:33 [-0500], Mathieu Malaterre wrote:
> Hello,
>
> First of all, let me apologize if it's not the proper mailing list for
> this question. And please direct me to another ML / newsgroup if necessery.
>
> I send a question to news://comp.sys.be.programmer, but as nobody
> answered it I am trying in a bigger BeOS community. So here is my question:
>
> --------------------------------------------------------
> Hello,
>
> I found yet another /feature/ in BeOS. I hope you guys could help
> me again. Is there a way to use select() on BeOS for file.
>
> I found this on groups.google:
>
> [stdin input doesn't work because ssh select()'s both the network socket
and
> the stdin file descriptor. On BeOS, select() only works for network
sockets.
> You have to rewrite the code to have one thread waiting in a read() for
stdin
> input, one waiting in a recv() for network input, and both sending the data
> they receive to the parent (the original code).]
>
> I guess I have a few options:
> - Do you think somebody rewrote the select function ?
> - Do think I can use BONE (I found it fully support select), but not
> sure what it is exactly.
> - Any other tricks to work around this bug ?
>
>
> Thanks again a lot guys,
> Mathieu
> --------------------------------------------------------
>
> I could now extend the possibilities to:
> - Should I wait until OpenBeOS will be ready ?
> - How does people work around one very important function from the POSIX
> specification, what different approach the BeOS team decide to choose (I
> never say select() was compulsory, but would like to know how process
> execution is available in BeOS) ?
>
> Thanks a lot,
> Mathieu
- Follow-Ups:
- [openbeos] Re: select() in BeOS ?
- From: Mathieu Malaterre
- References:
- [openbeos] select() in BeOS ?
- From: Mathieu Malaterre
Other related posts:
- » [openbeos] select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- » [openbeos] Re: select() in BeOS ?
- [openbeos] Re: select() in BeOS ?
- From: Mathieu Malaterre
- [openbeos] select() in BeOS ?
- From: Mathieu Malaterre