i want to control the TTYs (serial port )used by applications on my pc. there is an applications that shows the status of each port by indicating the processes which are using? Thanks a lot!
Try to use the command lsof
.
lsof /dev/ttyX
To get the PID directly, use:
lsof -Fp /dev/ttyX