home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.soft-sys.andrew
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!cunews!csi.uottawa.ca!news
- From: isabelle@shamin.genie.uottawa.ca (Isabelle Tourneux)
- Subject: communication between Adew controllers
- Message-ID: <1992Nov20.205516.1211@csi.uottawa.ca>
- Originator: isabelle@shamin.genie.uottawa.ca
- Sender: news@csi.uottawa.ca
- Nntp-Posting-Host: shamin.genie.uottawa.ca
- Organization: MCRLab - University of Ottawa
- Date: Fri, 20 Nov 92 20:55:16 GMT
- Lines: 63
-
-
- First, thank you very much for all the detailed answers you have
- given me concerning message queues. This has however led me to
- other questions :
-
- I have several adew "view+controller" in the same machine, which
- are spawned successively with forks and execs. I would like to have
- them communicate with each other. So I have looked at all the
- possible means of communication between these controllers. I am
- using System V.
-
- - FIFO and message queues work but they are not directly usable to
- read a message that can come any time. I would have to be waiting
- for it or to have an infinite loop in the code of the adew
- controller, which is not possible. I know it is possible to
- modify xim.c and to add a message queue to the select, , but I do
- not wish to do such low-level modifications on xim.c.
-
- - interruptions would be a nice solution, but I have not managed
- to get the pid of the controller without clicking somewhere on the
- view. A getpid() in controller_go gives the pid of runadew I guess.
- Moreover, runadew puts the group id of the controller equal to the
- pid of this controller, so I cannot get the group id of the
- controller without clicking on the view, as for the pid. Is it
- possible to change the code of runadew to prevent it from
- initializing the group id of the controller ? Do you think
- interruptions would work as I am working under System V and Xwindows
- ?
-
- - I know sockets would be a solution, but I would prefer not to
- use them for internal communication between processes runing on
- the same machine : I am afraid I will not be able to send a huge
- file through a socket without cutting it into smaller parts, and I
- would like to avoid that. Do you think Unix Domain Sockets could
- allow me to send huge file without cutting them ?
-
- - as all my controllers have got different names, I have thought
- about memorizing the pointers on each controller in a memory shared
- by all the processes :
- struct controlleri * ptri ( i = 1, 2...),
- and call functions of a controller from another controller, using
- this pointers : controller1_thisFunction(ptr1) in the code of the
- 2nd controller for instance.
- The 1st controller is running, but the function is not called
- successfully, and there is a segmentation fault. Before, I had
- never had problems with memorizing pointers on an ATK view or
- dataobject in another ATK view or dataobject, and calling
- functions with these pointers. Is there something specific to adew
- which prevents from doing that ?
-
-
- I am trying at any rate to establish a
- communication between Adew controllers, but it is hard because adew
- and runadew were not written for that kind of application, but were
- supposed to be used only for prototyping. Anyway I really want to
- find a way of establishing these connections, even if the solution
- is not the most elegant.
-
- Thanks for your help.
-
- isabelle Tourneux
- Multimadia Lab of the University of Ottawa.
- isabelle@shamin.genie.uottawa.ca
-