home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / perl / 7600 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.7 KB  |  52 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!uvaarpa!mmdf
  3. From: Robert Wornan <bobw@mg-entreprises.fr>
  4. Subject: forks and waits
  5. Message-ID: <1992Dec23.222743.13902@uvaarpa.Virginia.EDU>
  6. Sender: mmdf@uvaarpa.Virginia.EDU (Mail System)
  7. Reply-To: bobw@mg-entreprises.fr
  8. Organization: The Internet
  9. Date: Wed, 23 Dec 1992 22:27:43 GMT
  10. Lines: 40
  11.  
  12. Hello,
  13.  
  14. I'm designing a system that collects information nightly from 17
  15. different sites on our network.
  16.  
  17. The sites are connected together by routers, which communicate through
  18. the national ISDN network here in France.
  19.  
  20. We have two lines into the ISDN net, and we would like to use them as
  21. fully as possible to finish the transfer as quickly as possible.
  22.  
  23. My idea is to fork 17 processes, each of which will try to get the
  24. data from a remote site (ftp or rcp?). Clearly, only two at a time
  25. will get through, since there are only two channels that can be used
  26. simultaneously. I should be able to look at return codes or something
  27. to see which have succeeded, and pass this info back to the parent
  28. process via intermediate files.
  29.  
  30. Assuming the logic is OK till this point, I need to know which child
  31. returned. Since I will be issuing a "system" within the child, if I
  32. understood the doc., with a "wait", I may not get back a child pid
  33. that I know about, and if I issue a "waitpid" I need to know which pid
  34. I'm waiting for, which is not the case.
  35.  
  36. I'm sure I've missed something obvious, but am not sure what? 
  37.  
  38. Any suggestions or comments would be _very_ welcome.
  39.  
  40. Please respond by mail.
  41.  
  42. Thanks and regards,
  43.  
  44. Bob
  45.  
  46.  
  47. -- 
  48. Robert Wornan        | uucp: bobw@mge.uucp
  49. MG Entreprises        | internet: bobw@mg-entreprises.fr
  50. 42 rue Voltaire        | tel: +33 1 42 04 35 83
  51. 92800 Puteaux,    France    
  52.