- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ,Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page