How to correctly shutdown a rosnode?
I test a simple code snippet:
import rospy
import time
import sys
if __name__=="__main__":
rospy.init_node("a node")
rospy.signal_shutdown("an exception")
this code will cause /rosout create a file descriptor leak, check with:
lsof -n | grep rosout
which shows a line "rosout 111215 13u sock 0,8 0t0 797756 can't identify protocol".
Each time the code is executed, one more file descriptor leak will be created.
How to prevent this?
This looks like a duplicate of http://answers.ros.org/question/25039...
That question is also posted by me, an established socket should be listed like "rosout 111215 111574 10u IPv4 794212 0t0 TCP 127.0.0.1:40341->127.0.0.1:39110 (ESTABLISHED)", but by no means "can't identify protocol".
Hi nansmallgong, can just show me your launch file?