What happens to Binder when a component exits?

3 views
Skip to first unread message

Justin Mattson

unread,
Oct 10, 2022, 9:50:58 AM10/10/22
to component-framework-dev
If a child exposes Binder from framework, does that close when the component exits? Does anyone know off hand? It isn't very important to know this so please don't bother rummaging around in the code if the answer doesn't happen to come to you immediately.

Cheers,
Justin

How am I doing? (anonymous feedback)

Gary Bressler

unread,
Oct 10, 2022, 12:21:03 PM10/10/22
to Justin Mattson, component-framework-dev
It's supposed to, yes.

--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "component-framework-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to component-framewo...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/component-framework-dev/CA%2BX8dX_3M2KYsFuYPZYOLG7jv_aM1Da6WyUFvONcJ3%3Dx-5MWBA%40mail.gmail.com.

Rich Kadel

unread,
Oct 10, 2022, 1:08:18 PM10/10/22
to Gary Bressler, Justin Mattson, component-framework-dev
Notably, it didn't work for me in the way I expected.

When I was trying to update ElementManager for CFv2, to trigger an action when a component exits (specifically, terminal, when the user types `exit` and the terminal process exits), I tried to catch a PEER_CLOSED signal on Binder, but it didn't work.

However, when I changed the code to trigger actions when catching a PEER_CLOSED signal on the ViewController, that did work.

So I don't know what that means. Perhaps Binder does not stay open after it's used to start a component. Or maybe ElementManager dropped it earlier than I expected. (I didn't think so, but maybe I missed something.)

Just be aware that there is at least anecdotal evidence it might not be useful in the way one might expect.

Rich



Gary Bressler

unread,
Oct 10, 2022, 2:02:32 PM10/10/22
to Rich Kadel, Justin Mattson, component-framework-dev
Could you file a bug for this?

If you connected to `Binder` after the component exited, that would be a scenario in which you would miss the PEER_CLOSED. Otherwise, it should work like any other capability.

(Although listening to ViewController might actually be a better choice in this situation)

Adam Perry

unread,
Oct 10, 2022, 2:06:47 PM10/10/22
to Gary Bressler, Rich Kadel, Justin Mattson, component-framework-dev
Do we have a test for the PEER_CLOSED behavior?



--
Adam Perry
Reply all
Reply to author
Forward
0 new messages