<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Ora pois... :)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>É fácil verificares se um programa está a correr:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>use Unix::PID;</DIV><DIV>my $pid = Unix::PID-&gt;new();</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>until($pid-&gt;get_pidof("programa_que_tem_que_estar_a_correr")){</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>sleep 1; #espera até que o programa arranque</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>outra alternativa seria utilizares o output de um "ps ax|grep programa_que_tem_que_estar_a_correr", mas é meio feio.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV>Nélio Nunes</DIV><DIV><A href="mailto:nelio.nunes@sapo.pt">nelio.nunes@sapo.pt</A></DIV><DIV>PT.COM/SAPO - DTP</DIV><DIV><BR class="khtml-block-placeholder"></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN></SPAN> </DIV><BR><DIV><DIV>On 2007/04/13, at 21:04, Patty Silva wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="font-family:times new roman, new york, times, serif;font-size:10pt"><DIV>Pessoal.. tem alguma biblioteca que faz o seguinte:<BR>Preciso rodar um programa porem ele nao pode rodar sem que o programa em perl anterior esteja rodando.. :D<BR><BR>Tem alguma biblioteca que facilite?<BR><BR><BR>Obrigada<BR></DIV></DIV><BR>__________________________________________________<BR>Fale com seus amigos  de graça com o novo Yahoo! Messenger <BR><A href="http://br.messenger.yahoo.com">http://br.messenger.yahoo.com</A>/ <DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Cascavel-pm mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Cascavel-pm@pm.org">Cascavel-pm@pm.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://mail.pm.org/mailman/listinfo/cascavel-pm">http://mail.pm.org/mailman/listinfo/cascavel-pm</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>