'How to prevent process from being killed in linux

I have a socat process running in background which creates 2 pseudo serial ports under /dev and 2 file descriptors linking to them from /tmp: socat PTY,link=/tmp/ttys0,raw,echo=0 PTY,link=/tmp/ttys1,raw,echo=0 &

ls -ltr /tmp/

ttys1 -> /dev/pts/2 ttys0 -> /dev/pts/1

However this process will be killed randomly, some times it lives for 5 days, some times just half day. What is killing it? How should I prevent it from being killed?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source