--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了Google网上论坛中的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到shlug+un...@googlegroups.com。
要查看更多选项,请访问https://groups.google.com/d/optout。
proc下面的很多文件,更像是硬链接,指向的是实际的inode。而非符号链接那样,指向的位置。这就导致你删除原文件建立新文件后,可以通过仍在运行的进程的proc找到原始文件。例如上次有人出了一个数据库问题,数据文件被删除。事后在总结里面感慨的第一点就是不专业,上去就重启了数据库。如果没重启,可以通过/proc/pid/fd来找到原始内容。
2014-06-22 9:36 GMT+08:00 DaboD <daid...@gmail.com>:
一直以為它只是個 symlink... 直到剛才才知道這個檔案這麼神奇早上 Gentoo 更新了 tmux 後發現連不上先前的 session 了, 因為 protocol version 不同. 上網一找, 在 Google+ 上發現人家的解法$ pid=$(pgrep tmux)$ /proc/$pid/exe attachman proc 中說這玩意的功能用法之一You can even type /proc/[pid]/exe to run another copy of the same executable as is being run by process [pid]
也就是 disk 上是新版的 tmux, 但通過這個 symlink 可以執行到內存中當初產生 process 的 executable.大一點的 executable 也能這麼搞嗎?
--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了Google网上论坛中的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到shlug+unsubscribe@googlegroups.com。
要查看更多选项,请访问https://groups.google.com/d/optout。