home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / softsys / andrew / 1392 < prev    next >
Encoding:
Text File  |  1992-11-20  |  3.4 KB  |  76 lines

  1. Newsgroups: comp.soft-sys.andrew
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!nott!cunews!csi.uottawa.ca!news
  3. From: isabelle@shamin.genie.uottawa.ca (Isabelle Tourneux)
  4. Subject: communication between Adew controllers
  5. Message-ID: <1992Nov20.205516.1211@csi.uottawa.ca>
  6. Originator: isabelle@shamin.genie.uottawa.ca
  7. Sender: news@csi.uottawa.ca
  8. Nntp-Posting-Host: shamin.genie.uottawa.ca
  9. Organization: MCRLab - University of Ottawa
  10. Date: Fri, 20 Nov 92 20:55:16 GMT
  11. Lines: 63
  12.  
  13.  
  14. First, thank you very much for all the detailed answers you have
  15. given me concerning message queues. This has however led me to
  16. other questions :
  17.  
  18. I have several adew "view+controller" in the same machine, which
  19. are spawned successively with forks and execs. I would like to have
  20. them communicate with each other. So I have looked at all the
  21. possible means of communication between these controllers. I am
  22. using System V.
  23.  
  24. - FIFO and message queues work but they are not directly usable to
  25. read a message that can come any time. I would have to be waiting
  26. for it or to have an infinite loop in the code of the adew
  27. controller, which is not possible. I know it is possible to
  28. modify xim.c and to add a message queue to the select, , but I do
  29. not wish to do such low-level modifications on xim.c.
  30.  
  31. - interruptions would be a nice solution, but I have not managed
  32. to get the pid of the controller without clicking somewhere on the
  33. view. A getpid() in controller_go gives the pid of runadew I guess.
  34. Moreover, runadew puts the group id of the controller equal to the
  35. pid of this controller, so I cannot get the group id of the
  36. controller without clicking on the view, as for the pid. Is it
  37. possible to change the code of runadew to prevent it from
  38. initializing the group id of the controller ? Do you think
  39. interruptions would work as I am working under System V and Xwindows
  40. ?
  41.  
  42. - I know sockets would be a solution, but I would prefer not to
  43. use them for internal communication between processes runing on
  44. the same machine : I am afraid I will not be able to send a huge
  45. file through a socket without cutting it into smaller parts, and I
  46. would like to avoid that. Do you think Unix Domain Sockets could
  47. allow me to send huge file without cutting them ?
  48.  
  49. - as all my controllers have got different names, I have thought
  50. about memorizing the pointers on each controller in a memory shared
  51. by all the processes :
  52.  struct controlleri * ptri ( i = 1, 2...),
  53. and call functions of a controller from another controller, using
  54. this pointers : controller1_thisFunction(ptr1) in the code of the
  55. 2nd controller for instance.
  56. The 1st controller is running, but the function is not called
  57. successfully, and there is a segmentation fault. Before, I had
  58. never had problems with memorizing pointers on an ATK view or
  59. dataobject in another ATK view or dataobject, and calling
  60. functions with these pointers. Is there something specific to adew
  61. which prevents from doing that ? 
  62.  
  63.  
  64.                          I am trying at any rate to establish a
  65. communication between Adew controllers, but it is hard because adew
  66. and runadew were not written for that kind of application, but were
  67. supposed to be used only for prototyping. Anyway I really want to
  68. find a way of establishing these connections, even if the solution 
  69. is not the most elegant.
  70.  
  71. Thanks for your help.
  72.  
  73. isabelle Tourneux
  74. Multimadia Lab of the University of Ottawa.
  75. isabelle@shamin.genie.uottawa.ca
  76.