Displaying 4 results from an estimated 4 matches for "canexecute".
2009 Jul 17
3
[LLVMdev] [PATCH 1/2] Trailing whitespace.
...,
const char** envp,
const Path** redirects,
unsigned secondsToWait,
unsigned memoryLimit,
- std::string* ErrMsg)
+ std::string* ErrMsg)
{
if (!path.canExecute()) {
if (ErrMsg)
@@ -174,7 +174,7 @@ Program::ExecuteAndWait(const Path& path,
if (RedirectIO(redirects[0], 0, ErrMsg)) { return -1; }
// Redirect stdout
if (RedirectIO(redirects[1], 1, ErrMsg)) { return -1; }
- if (redirects[1] && redirects[2] &am...
2009 Jul 17
1
[LLVMdev] [PATCH 2/2] Make Program::ExecuteNoWait return a process ID.
...274,7 @@ Program::ExecuteAndWait(const Path& path,
}
-void
+Program::ProcessID
Program::ExecuteNoWait(const Path& path,
const char** args,
const char** envp,
@@ -285,36 +285,36 @@ Program::ExecuteNoWait(const Path& path,
if (!path.canExecute()) {
if (ErrMsg)
*ErrMsg = path.toString() + " is not executable";
- return;
+ return 0;
}
// Create a child process.
- int child = fork();
+ ProcessID child = fork();
switch (child) {
// An error occured: Return to the caller.
case -1:
Mak...
2009 Jul 17
0
[LLVMdev] [PATCH 2/2] Make Program::ExecuteNoWait return a process ID.
...& path,
>
> }
>
> -void
> +Program::ProcessID
> Program::ExecuteNoWait(const Path& path,
> const char** args,
> const char** envp,
> @@ -285,36 +285,36 @@ Program::ExecuteNoWait(const Path& path,
> if (!path.canExecute()) {
> if (ErrMsg)
> *ErrMsg = path.toString() + " is not executable";
> - return;
> + return 0;
> }
>
> // Create a child process.
> - int child = fork();
> + ProcessID child = fork();
> switch (child) {
> // An error occured:...
2009 Nov 25
0
[LLVMdev] [llvm-commits] [llvm] r89765 - in /llvm/trunk: include/llvm/System/Path.h lib/System/Unix/Path.inc lib/System/Win32/Path.inc
...;);
>>> + return true;
>>> + }
>>> +
>>> + if (S_ISDIR(buf.st_mode) || S_ISREG(buf.st_mode)) {
>>> + return false;
>>> + }
>>> +
>>> + return true;
>>> +}
>>> +
>>> +bool
>>> Path::canExecute() const {
>>> if (0 != access(path.c_str(), R_OK | X_OK ))
>>> return false;
>>> @@ -723,7 +741,7 @@
>>>
>>> bool
>>> Path::eraseFromDisk(bool remove_contents, std::string *ErrStr) const {
>>> - // Get the status so we can dete...