Skip to content

Conversation

@Red-Eyed
Copy link
Contributor

Fixed issue #145 GPIO library doesn't free GPIO file descriptor. File descriptor leak.
Made a little bit refactoring.

…or. File descriptor leak.

Made a little bit refactoring
@Red-Eyed
Copy link
Contributor Author

I did strace and what I saw:
I was looking at these logs for about 10 min and leds continued blinking.

select(0, NULL, NULL, NULL, {0, 100000}) = 0 (Timeout)
access("/sys/class/leds/beaglebone:green:usr1/brightness", W_OK) = 0
open("/sys/class/leds/beaglebone:green:usr1/brightness", O_WRONLY) = 4
write(4, "1", 1)                        = 1
close(4)               

@pdp7
Copy link
Collaborator

pdp7 commented Jun 27, 2017

Thanks for the fix. I'll test it out.

@pdp7
Copy link
Collaborator

pdp7 commented Jun 27, 2017

pytest completed OK.

debian@beaglebone:~/pr/adafruit-beaglebone-io-python$ sudo pytest
============================================================================ test session starts ============================================================================
platform linux2 -- Python 2.7.9, pytest-3.1.2, py-1.4.34, pluggy-0.4.0
rootdir: /home/debian/pr/adafruit-beaglebone-io-python, inifile:
collected 58 items 

test/test_adc.py ......
test/test_gpio_input.py ..
test/test_gpio_output.py ......
test/test_gpio_setup.py ..........
test/test_led.py ..
test/test_pwm_setup.py ...........................
test/test_spi.py ..
test/test_uart.py ...

========================================================================= 58 passed in 3.46 seconds =========================================================================

@pdp7 pdp7 merged commit 451d50c into adafruit:master Jun 27, 2017
@pdp7
Copy link
Collaborator

pdp7 commented Jun 27, 2017

Thanks @Vadim-Stupakov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants