Closed kiko0217 closed 3 years ago
The message
sigHandler: Unhandled signal 2, terminating
is printed by the pigpio C library signal handler here
Signal 2 or SIGINT is the "terminal interrupt" signal that is sent when the user types the terminal interrupt character which is normally ctrl+c.
I guess you hit ctrl+c to terminate the application. If this is the case all is ok and there isn't a problem. To the best of my knowledge, the pigpio C library can't be configured to prevent it from handling SIGINT the way it does.
To the best of my knowledge nothing needs to be changed in pigpio here, so I'll go ahead and close the issue.
For those of us who ended up here wanting to implement their own signal handler, make sure you do your signal()
call AFTER you call gpioInitialise()
. This will override the pigpio handler.
For those of us who ended up here wanting to implement their own signal handler, make sure you do your
signal()
call AFTER you callgpioInitialise()
. This will override the pigpio handler.
For further information and an example see the documentation for the initialize()
method.
I am working on interfacing dht11 with Raspberry Pi. My code is as per this link: https://github.com/jimstudt/dht11-pigpio/blob/master/dht11-pigpio.c. My concern is when I press Ctrl+C, I get the error "Unhandled Signal 2, terminating" and after that I cannot write further commands on my linux terminal. Can anyone tell me what should I do?
I am working on interfacing dht11 with Raspberry Pi. My code is as per this link: https://github.com/jimstudt/dht11-pigpio/blob/master/dht11-pigpio.c. My concern is when I press Ctrl+C, I get the error "Unhandled Signal 2, terminating" and after that I cannot write further commands on my linux terminal. Can anyone tell me what should I do?
@darshitagrawal This repository is the Node.js (JavaScript) pigpio repository. Support for the pigpio C library is available at https://github.com/joan2937/pigpio
what is this problem? what is cause?
thank you for your answer