[prev in list] [next in list] [prev in thread] [next in thread]
List: enlightenment-devel
Subject: Re: [E-devel] ecore_pipe again
From: Peter Wehrfritz <peter.wehrfritz () web ! de>
Date: 2008-09-30 13:42:29
Message-ID: 48E22CC5.8070600 () web ! de
[Download RAW message or body]
Peter Wehrfritz schrieb:
> Sebastian Dransfeld schrieb:
>
>> Peter Wehrfritz wrote:
>>
>>
>>> Hi all,
>>>
>>> I took Vincent's last ecore_pipe approach and changed ecore_pipe_write
>>> to accept variable long data and not only a pointer. I also added the
>>> possibility to pass a data pointer to the handler callback to avoid the
>>> usage of globals. The win version does probably not work.
>>>
>>> Please read it carefully, because I'm not very familiar with pipes.
>>> Attached you'll find a little test app, too.
>>>
>>>
>> Shouldn't you check that you actually read the number of bytes the
>> system says is in the pipeline
>>
>
> Right, sorry I forgot to mention, that I skipped them, because I'm not
> sure how I should handle these cases. Of course that doesn't mean that
> we have not to handle them.
>
> 1. What shall we do if the return size is smaller (but > 0). If I
> understood it right, that can happen if the writing process writes more
> bytes then PIPE_BUF. Should we then retry it, to get the rest of the
> data. Or should we buffer the already read data and try it to get the
> rest when _ecore_pipe_read is called again.
>
> 2. What should we do if we get an error messages? And when can this
> happen? If we can loose some bytes then we are out of sync with the
> lenght and data portions and the results would be randomly, but in any
> case wrong.
>
> 3. In Vincent's version he called read as long as he gets pointer from
> the pipe, should I also loop as long as there is data in the pipe?
>
> I hope I covered here all possible errors
Can anyone help here? I don't need it personally, but it'd be nice to
have it in ecore. Especially since it isn't that trivial like it looks
on the first sight.
Peter
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic