Skip to content

Commit 69bb682

Browse files
committed
Clean up doxygen comments for llvm::sys::ExecuteNoWait
1 parent cffa46e commit 69bb682

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

llvm/include/llvm/Support/Program.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,21 @@ namespace sys {
141141
/// program shall run on.
142142
);
143143

144-
/// Similar to ExecuteAndWait, but returns immediately.
145-
/// @returns The \see ProcessInfo of the newly launched process.
144+
/// Similar to \ref ExecuteAndWait, but returns immediately.
145+
/// \returns The \ref ProcessInfo of the newly launched process.
146146
/// \note On Microsoft Windows systems, users will need to either call
147-
/// \see Wait until the process finished execution or win32 CloseHandle() API
148-
/// on ProcessInfo.ProcessHandle to avoid memory leaks.
149-
ProcessInfo ExecuteNoWait(StringRef Program, ArrayRef<StringRef> Args,
150-
std::optional<ArrayRef<StringRef>> Env,
151-
ArrayRef<std::optional<StringRef>> Redirects = {},
152-
unsigned MemoryLimit = 0,
153-
std::string *ErrMsg = nullptr,
154-
bool *ExecutionFailed = nullptr,
155-
BitVector *AffinityMask = nullptr,
156-
bool DetachProcess = false);
147+
/// \ref Wait until the process has finished executing or win32's CloseHandle
148+
/// API on ProcessInfo.ProcessHandle to avoid memory leaks.
149+
ProcessInfo ExecuteNoWait(
150+
StringRef Program, ArrayRef<StringRef> Args,
151+
std::optional<ArrayRef<StringRef>> Env,
152+
ArrayRef<std::optional<StringRef>> Redirects = {},
153+
unsigned MemoryLimit = 0, std::string *ErrMsg = nullptr,
154+
bool *ExecutionFailed = nullptr, BitVector *AffinityMask = nullptr,
155+
/// If true the executed program detatches from the controlling
156+
/// terminal. I/O streams such as llvm::outs, llvm::errs, and stdin will
157+
/// be closed until redirected to another output location
158+
bool DetachProcess = false);
157159

158160
/// Return true if the given arguments fit within system-specific
159161
/// argument length limits.

llvm/lib/Support/Unix/Program.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ static bool Execute(ProcessInfo &PI, StringRef Program,
311311

312312
if (DetachProcess) {
313313
// Detach from controlling terminal
314-
if (setsid() == -1) {
315-
MakeErrMsg(ErrMsg, "Couldn't detach process, setsid() failed");
314+
if (::setsid() == -1) {
315+
MakeErrMsg(ErrMsg, "Could not detach process, ::setsid failed");
316316
return false;
317317
}
318318
}

0 commit comments

Comments
 (0)