1

I have a parent process (which is a basic tcp server). This process calls gpioInitialise() before forking a child process which polls gpio pins for input. After forking the child, the parent process read()s a socket in a while loop. The parent also should be able to access gpio via the library.

Now, both processes will run in parallel and are polling for different events. However, when I try to access the library from the child, I get:

[code]2014-11-06 09:53:09 sigHandler: Unhandled signal 11, terminating[/code]

How can I solve this?

  • 1
    I have commented at raspberrypi.org. I haven't tried what you describe but generally only one process should be using the gpioXXX functions, other processes should be talking via sockets or pipes. – joan Nov 6 '14 at 9:04
  • Thanks Joan. I read your reply there. I have changed my code to use the daemon. – user3490458 Nov 6 '14 at 10:00
  • 1
    An alternative, which may be closer to what you are trying to do, is to use the gpioStartThread function. – joan Nov 6 '14 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.