How do I catch the loadusr process termination signal in LinuxCNC 2.9.2?

More
24 Apr 2025 11:21 #326994 by kitkat
English is not my native language, so sorry for possible mistakes.

I write a c++ program that I run by adding loadusr myprogram to custom.hal(I'm using AXIS gui). This program do some stuff and closes with exiting from AXIS. I catch unix signals like SIGTERM and SIGQUIT to gracefully terminate this program(closing file descriptors, sockets and so on). Everything worked fine on LinuxCNC 2.8.4 but stopped working when I switch to LinuxCNC 2.9.2.
I can catch and handle signals when I directly run my program from terminal, but I can't catch signals when I run it via loadusr. I try with SIGTERM, SIGINT and SIGQUIT signals, nothing gets caught. Looks like in LinuxCNC 2.9.2 AXIS does't sending any of this signals to close it's loadsur subprocesses. Does it use any other signals to close its subprocesses? Or do I need to use another way to catch the termination of the program?

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum