# Closing program

**URL:** <https://forum.sunfounder.com/t/closing-program/4311>\
**Category:** Robotic kit for Raspberry Pi\
**Created:** [January 27, 2026, 10:54am UTC](https://forum.sunfounder.com/t/closing-program/4311 "2026-01-27T10:54:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Spf650](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@Spf650](https://forum.sunfounder.com/u/Spf650)\
**Post date:** [January 27, 2026, 1:55pm UTC](https://forum.sunfounder.com/t/closing-program/4311/3 "2026-01-27T13:55:53Z")

</div>

I tried to explain this to my best understanding here, and gave 3 alternatives. Hopefully its clear!

> [@GPIO state after a program abort or user exit](https://forum.sunfounder.com/t/gpio-state-after-a-program-abort-or-user-exit/4181):
>
> I hope this little topic is of some help I’ve seen several user questions whereby when a program terminates incorrectly for whatever reason, it can leave the GPIO in a “busy” state. Usually requiring a reboot. Instead of a reboot one can often find the owner process id and just kill it e.g running some python code such as DummySpeech.py may show … File “/usr/lib/python3/dist-packages/lgpio.py”, line 458, in \_u2i raise error(error\_text(v)) lgpio.error: ‘GPIO busy’ on subsequent runs. To …

As far as I could ever determine, dog.close() is not a cleanup method, it is a terminal control-flow primitive, it assumes it is called from top-level (parent) code and it was never meant to return.

---

_[View the full topic](https://forum.sunfounder.com/t/closing-program/4311)._
