开发者

dtach - how to check if attached or unattached

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜