home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / perl / 7598 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.8 KB

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