Le 07/03/06, Xavier Mertens<[EMAIL PROTECTED]> a écrit : > Bonjour à tous, > > J'ai un problème bizarre avec un script Perl qui se fork(). > Afin d'augmenter les performances, j'ai un fichier à processer et à > transferrer par FTP vers divers destinations. > > Donc, je crée un process par destination via fork(). Finalement, j'efface le > fichier source. > > Le problème, c'est que certains sous-process n'ont pas le temps d'accèder au > fichier, il est effacés AVANT. > > Qqn a une méthode safe pour gérer ce genre de problème? > Ex: attendre que tous les processes "forkés" soit terminés? > > Xavier > -- > Free shell account on www.rootshell.be! >
j'ai jeté un oeil dans la man de fork pour perl (perlfork pour la nommer) et ils parlent de wait(), c'est peut-être une voie à explorer? -- Thomas Silvestre _______________________________________________________ Linux Mailing List - http://www.unixtech.be Subscribe/Unsubscribe: http://lists.unixtech.be/cgi-bin/mailman/listinfo/linux Archives: http://www.mail-archive.com/linux@lists.unixtech.be IRC: chat.unixtech.be:6667 - #unixtech NNTP: news.gname.org - gmane.org.user-groups.linux.unixtech