> 2. system ($cmd) and `$cmd` do _wait_ for the command to
> finish before returing (the difference being system retuns
> the command's return code and `` returns the output). A
> series of these should do what you want.
    ....thats what I though, but aparently thats not the case. This maybe do
to a fact that I am starting a child which in return starts a child, hance I
create grandchild. So I dont think system waits fro grandkids to compleate.
after I extract a given cab I need to configure it. So what ends up
happening is that my configure script ends up runing before the cab is
extracted.

Mark

----- Original Message -----
From: "Beau E. Cox" <[EMAIL PROTECTED]>
To: "Mark Goland" <[EMAIL PROTECTED]>; "perl" <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 1:34 PM
Subject: RE: waitpid


> Hi -
>
> > -----Original Message-----
> > From: Mark Goland [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 15, 2003 7:56 AM
> > To: perl
> > Subject: waitpid
> >
> >
> > Hello Perl lovers,
> >
> >  I am developing a script which runs in TCSH 6.x shell. I have
> > two questions
> >
> > 1.  I need to be able to set an global enviernment variable. The
> > shell has a
> > build in command setenv which would enable me to do what I need. This is
> > what I try,
> >
> > system("setenv DESTDIR /mnt");
> >
> > ...but this fails , by hand in works great. Source has the same
> > problme. Any
> > ideas ???
> >
> > 2. I need to run a few external commands sequantialy. Run one
> > wait on it to
> > compleate run the others.... a sample command would be
> >
> > system("cat cab.??|tar vxz -C ${DESTDIR}");
> >
> >  In C I would usually fork and waitpid on child, I was wondering
> > if there is
> > a short trick to this in Perl. ( I know IPC::OpenX returns pid
> > and I can do
> > a waitpid on it ) .
> >
> > Thanx in advance,
> > Mark
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> 1. ???
> 2. system ($cmd) and `$cmd` do _wait_ for the command to
> finish before returing (the difference being system retuns
> the command's return code and `` returns the output). A
> series of these should do what you want.
>
> Aloha => Beau;
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to