[interfacekit] Re: BSession
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Thu, 22 Apr 2004 15:13:03 +0200 CEST
Adi Oanca <adioanca@xxxxxxxxx> wrote:
> > How can this make any sense?
> > There are several possibilities for a port write (or read) to fail,
> > it
> > doesn't have to be that the port no longer exists. For example,
> > BeOS
> > has a limit of how much memory can be in all ports in the system,
> > this
> > is not related to the application.
> And if this happens, the app should not fail?
Not at all. Not something as important as the app_server.
> > An even more important thing to consider is B_INTERRUPTED - that
> > can
> > happen in all user space code and it should probably be resistant
> > against it.
> I know about it for a long time, but I haven't modified BSession.
> Lazy
> me! :-)
You should put "ToDo" items in the code, then. That would not only be a
reminder for you, but also a hint for someone who is reviewing the
code.
> >> No, all datas will be dumped until the next code is recognized.
> >> I know about this... and I had in plan to suffix each
> > > instruction
> >>with... AS_END_INSTRUCTION.
> > How could this help? What you could do is something similar to what
> > TCP
> > is doing: have a packet counter.
> And manually calculate the byte count of a massage? Don't you think
> that is a bit... odd and unpractical? Remember that the tail of an
> instruction may be in another BSession message.
Why manually calculate the byte count? If a packet number doesn't
match, the app_server could reset the connection and ask for the whole
thing again.
But anyway, out-of-sync kind of errors would only be possible if the
sender doesn't work correctly, i.e. if it would not do any error
checking.
> >> In 99.99999% of cases this won't happen. Unless a bad user or
> >>program
> >>will write to a ServerWindow port. I have discussed this with
> > > Michael
> >>and he said it is not concerned by security.
> > If we can do 100% we should do it. This is not "just" a user
> > application that would die, this is a system component; the
> > standards
> > should be a big higher here.
> app_server would not die! just one of its threads!
If it would just sit on a port, there probably wouldn't be a problem,
but who guarantees that it won't crash (in which case the whole
app_server would be taken down)?
Bye,
Axel.
- Follow-Ups:
- [interfacekit] Re: BSession
- From: Adi Oanca
- References:
- [interfacekit] Re: BSession
- From: Adi Oanca
Other related posts:
- » [interfacekit] BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- » [interfacekit] Re: BSession
- [interfacekit] Re: BSession
- From: Adi Oanca
- [interfacekit] Re: BSession
- From: Adi Oanca