- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
hi all
i want to know if in µclinux wa can starte two application as two process to be communication between there , i have not the MMU ,링크가 복사됨
5 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
That task is not at all specific NIOS or using an MMU. It's just a general Linux question.
There are multiple ways. One very often used is to read and write pipes. You can test the appropriate user land software on any PC Linux box. -Michael- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
so i can use Fork() to create mutiprocess in my µclinux without MMU.?!!!
and thant i want to start toww application in same time , how i can do that,? thank'you- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
With noMMU Architecture, fork() is not available. You need to use vfork() instead. AFAIK, in MMU-Linux vfork() usually is mapped to fork(), so you can just always use vfork() unless you need some specifics of fork that vfork does not provide.
I don't know what you mean by "start two applications". But one application can use (v)fork() and friends to start another application, either using it's own code (thus working similar as a multi-thredded application) or load new code from a file. -Michael- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
vfork() stalls the calling process until the child calls exec().
So you can use it if you are using pipes (or similar) for communication between different programs, but not if you want to share any data areas. Other options - which may, or may not, be available under any specific *nix. - System V (named) shared memory - threads - mmap(... MAP_SHARED ...) - named pipes/fifos- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
--- Quote Start --- vfork() stalls the calling process until the child calls exec() --- Quote End --- And after that you have two processes running until the child stops. AFAIK, you need to take care that the parent does not stop before the child is gone. -Michael
