I would like only one process to open a PTY device created by socat. I used the following to create my_ser device, but it can be read / written by several processes.
socat -t 0 INTERFACE:my_nw,type=2 PTY,mode=0777,rawer,link=/dev/my_ser
I tried using socat -t 0 INTERFACE:my_nw,type=2 PTY,mode=0777,rawer,link=/dev/my_ser,ioctl-void=0x540c use the exclusive PTY lock (TIOCEXCL), but it does not work. I see that IOCTL is executing, but with no effect.
I am running an Ubuntu machine
source share