开发者

dtach - how to check if attached or unattached

开发者 https://www.devze.com 2023-01-01 09:20 出处:网络
I am creating a small C program which will find first unattached dtach session and attach to it. However dtach does not provide a way to check unattached/attached status. Is it possible to get this in

I am creating a small C program which will find first unattached dtach session and attach to it. However dtach does not provide a way to check unattached/attached status. Is it possible to get this information at all? (For example by directly reading socke开发者_如何学Cts created by dtach?)


use lsof to check how many dtach processes opened the socket file. if process number > 1, then the socket is attached.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号