home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!bnr.co.uk!uknet!mcsun!julienas!corton!mge!bobw
- From: bobw@mge.uucp (bobw)
- Newsgroups: comp.lang.perl
- Subject: forking and waiting
- Message-ID: <BOBW.92Dec23160622@mge.uucp>
- Date: 23 Dec 92 15:06:22 GMT
- Sender: bobw@mge.uucp (bob wornan)
- Distribution: comp
- Organization: MG-Entreprises, Paris, France
- Lines: 42
-
- I'm designing a system that collects information nightly from 17
- different sites on our network.
-
- The sites are connected together by routers, which communicate through
- the national ISDN network here in France.
-
- We have two lines into the ISDN net, and we would like to use them as
- fully as possible to finish the transfer as quickly as possible.
-
- My idea is to fork 17 processes, each of which will try to get the
- data from a remote site (ftp or rcp?). Clearly, only two at a time
- will get through, since there are only two channels that can be used
- simultaneously. I should be able to look at return codes or something
- to see which have succeeded, and pass this info back to the parent
- process via intermediate files.
-
- Assuming the logic is OK till this point, I need to know which child
- returned. Since I will be issuing a "system" within the child, if I
- understood the doc., with a "wait", I may not get back a child pid
- that I know about, and if I issue a "waitpid" I need to know which pid
- I'm waiting for, which is not the case.
-
- I'm sure I've missed something obvious, but am not sure what?
-
- Any suggestions or comments would be _very_ welcome.
-
- Please respond by mail.
-
- Thanks and regards,
-
- Bob
-
- --
- Robert Wornan | uucp: bobw@mge.uucp
- MG Entreprises | internet: bobw@mg-entreprises.fr
- 42 rue Voltaire | tel: +33 1 42 04 35 83
- 92800 Puteaux, France
- --
- Robert Wornan | uucp: bobw@mge.uucp
- MG Entreprises | internet: bobw@mg-entreprises.fr
- 42 rue Voltaire | tel: +33 1 42 04 35 83
- 92800 Puteaux, France
-