Re: midi_server surviving app crash
Michael Pfeiffer <[email protected]> Thu, 10 Oct 2002 16:11:12 -0700
| Newsgroups | gmane.os.openbeos.midi |
|---|---|
| Message-ID | <LILI6431HCWQEBLILJUQE9QMGALKE9K.3da60910@name-sgc3h6xcx5> |
>> Imagine the following scenario: An application A registers a >> BMidiConsumer at the midi_server. Another app B connects >> a BMidiProducer to the consumer and starts sending >> Midi messages to the producer. Suddenly app A crashes. > >Brrr, it sounds like drama! >;-) LOL :) >> How treats the midi_server such a situation? > >Well, the IPC used by midikit2 seems to be ports, looking at some private >members of BMidiConsummer and BMidiRoster private methods. >BeOS kernel automagicly delete ports owned by dying teams. >I guess midi_server/BMidi* classes just take care to always check >port i/o routines for B_BAD_PORT_ID return code, and this case close any active >connection made on this endpoint & remove all dead midi endpoint(s). Yes that makes sense. I guess it is very unlikely that the midi_server or whatever misses the death of a port and instead communicates with the incarnation of the port. - Michael