Comments (12)
fork()的pid 不等于0 所以一直都不会走到监听的逻辑中,这个是怎么回事呀?
from appuninstall.
确认fork后pid不等于0?提供一下系统版本和手机型号。
http://linux.die.net/man/2/fork
from appuninstall.
我试了很多次,没有一次等于0的,galaxy3 ,5.1.1版本(自己刷的rom,有影响么?)
子进程fork()后 pid应该=0 但是不知道是不是我的手机问题,pid一直都是大于0的
from appuninstall.
from appuninstall.
写一个Demo,JNI调用C方法只fork进程并打印,看是否结果还是你说的那样。
from appuninstall.
@venshine 我测试过了 我如果使用fork()得到的pid每次都>0,如果使用getpid()是一个固定值
我已经凌乱了 我都怀疑我的手机是不是linux系统的
等下我再用虚拟机试试
from appuninstall.
@ray0807 你的问题很特别,虚拟机结果应该没问题,我看你的代码fork两次,你只fork一次打印一下看看结果是否还有问题。
from appuninstall.
小米系列好像不兼容吧?有解决方法吗?
from appuninstall.
from appuninstall.
能否提供一下com.wx.android.common.util.AppUtils这个类?你的github上没有提供
from appuninstall.
还有这个com.wx.android.common.util.PackageUtils;?
from appuninstall.
@happyKen 参考https://github.com/venshine/AndroidCommon
from appuninstall.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from appuninstall.