[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Unsolvable problem with pop3 kioslave.
From:       Don Sanders <dsanders () cch ! com ! au>
Date:       1999-12-26 0:34:45
[Download RAW message or body]

> The linux man-page states (dated: Linux 1.2, February 11, 1996)
> 
>      On exit,  the  sets  are  modified in place to indicate which
>      descriptors actually changed status.
> 
> It doesn't mention anything about different behaviour when a timeout 
> occurs. It says in addition that when an error occurs the sets are 
> undefined.
> 
> I don't have any BSD man-pages so I have no idea how the BSD behaviour 
> is. (It doesn't really matter does it? It now works on both BSD and 
> Linux.)

A small type section in Adv. Programming in the Unix Environment by Stevens 
(1993) on page 399 states about the select funtion:

"Be careful not to check the descriptior sets on return unless the return 
value is greater than 0. The return state of the descriptor sets is 
implementation dependent if either a signal is caught or the timer expires. 
Indeed, if the timer expires 4.3+BSD doesn't change the descriptor sets while 
SVR4 clears the descriptor sets. ... This again shows the problems we'll 
encounter until functions such as select are standardized by POSIX."

I guess Linux has "SVR4" type behaviour while FreeBSD has BSD type behaviour.

(I'm not trying to prove anything here rather just add some extra possibly 
clarifying info to this postmortem)

BFN,
Don.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic