[wellylug] Programming Question
Jethro Carr
dodocaptain at paradise.net.nz
Fri Nov 28 07:20:55 NZDT 2003
On Thu, 2003-11-27 at 20:55, Chris Harris wrote:
> > > > hi,
> > >
> > > > I need to make a program which can run another program on top
> > > > of it, so I can run another program, like cp to copy a file,
> > > > and then continue on with the program.
> > > In C you'd be using system() [don't use if the process
> > > you're about to call is setuid or setgid] or exec()
> > >
> > > man system
> > > man exec
> > >
> > > for details ;)
> >
> > Thanks, I want to use c, or c++
>
> /* docp.c */
> int main(){
> system("cp docp.c docp.copy&");
> return 0;
> }
Thanks, this command seems to work well.
--
-- Jethro
doodocaptain at paradise.net.nz
http://homepages.paradise.net.nz/jethroc/
http://homepages.paradise.net.nz/jethroc/cv/index.html
More information about the wellylug
mailing list