[wellylug] Programming Question

Chris Harris chris.harris at actrix.gen.nz
Thu Nov 27 20:55:13 NZDT 2003


> > >  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;
}



More information about the wellylug mailing list