ros2 / rmw_zenoh

RMW for ROS 2 using Zenoh as the middleware
Apache License 2.0
185 stars 34 forks source link

Fix handling of SIGINT by router executable #99

Closed Yadunund closed 8 months ago

Yadunund commented 8 months ago

Aim to address https://github.com/ros2/rmw_zenoh/issues/78

According to the manual page(), system will return -1 on error.

However right now, killing the process via SIGINT (CTRL+C) returns with error code 2. Investigating...

[2024-01-23T14:48:43Z INFO  zenohd] Starting required plugin "rest"
[2024-01-23T14:48:43Z INFO  zenohd] Successfully started plugin rest from "/usr/lib/libzenoh_plugin_rest.so"
[2024-01-23T14:48:43Z INFO  zenohd] Finished loading plugins
^C
Thread 1 "zenohd" received signal SIGINT, Interrupt.
syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
38  ../sysdeps/unix/sysv/linux/x86_64/syscall.S: No such file or directory.
(gdb) bt
#0  syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
#1  0x00005555557a6762 in parking::Inner::park ()
#2  0x0000555555696c43 in zenohd::main ()
#3  0x000055555561eaf3 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#4  0x00005555556b23a7 in main ()
(gdb) print $eax
$1 = -512