10

java fork进程问题

 2 years ago
source link: https://www.oschina.net/question/3917165_2325083
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

java fork进程问题

文刀流 发布于 昨天 17:24

@山哥 你好,想跟你请教个问题:看了您的文章[https://my.oschina.net/jsan/blog/273672],java 父进程fork一个子进程后,子进程是否可以访问父进程的对内存数据.

比如: 父进程中定义一个静态变量A=”A“,在父进程启动后修改A=”B“,然后fork一个子进程访问A,此时在子进程看来A是”A“还是”B“,我尝试过总是A.这是否意味着java子进程不能和父进程共享堆数据.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK