system() function
- From: "gio" <giorginooo.rossi@xxxxxxxx>
- Date: 21 Mar 2007 06:24:43 -0700
I have a problem and the solution should works under windows and unix
OS.
Suppose I have a program ex.c in the directory X (so the current
working directory of ex.c is X).
Also suppose I have this code fragment:
....
char otherpath[PATHLEN];
char cmd[CMDLEN];
....
....
otherpath="Y" //where y is a valid path string
....
system(cmd); //where cmd is any command string
....
If in cmd is specified a relative path, it is relative to the current
working directory(in this example is X).
There is a way to execute command wich paths are relatives to the
"otherpath" variable (in this example is Y)?
.
- Follow-Ups:
- Re: system() function
- From: jasen
- Re: system() function
- From: Josef Moellers
- Re: system() function
- Prev by Date: Re: Is splint the best for static code checking? I mean free.
- Next by Date: Re: system() function
- Previous by thread: daemon caching weird exit status from a shell script
- Next by thread: Re: system() function
- Index(es):
Relevant Pages
|