[llvm] r191973 - lli: Check pipe creation for errors.
Benjamin Kramer
benny.kra at googlemail.com
Fri Oct 4 12:10:04 PDT 2013
Author: d0k
Date: Fri Oct 4 14:10:03 2013
New Revision: 191973
URL: http://llvm.org/viewvc/llvm-project?rev=191973&view=rev
Log:
lli: Check pipe creation for errors.
This is unlikely to ever fail, but ubuntu GCC warns when the return value is
unused.
Modified:
llvm/trunk/tools/lli/Unix/RemoteTargetExternal.inc
Modified: llvm/trunk/tools/lli/Unix/RemoteTargetExternal.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/Unix/RemoteTargetExternal.inc?rev=191973&r1=191972&r2=191973&view=diff
==============================================================================
--- llvm/trunk/tools/lli/Unix/RemoteTargetExternal.inc (original)
+++ llvm/trunk/tools/lli/Unix/RemoteTargetExternal.inc Fri Oct 4 14:10:03 2013
@@ -34,8 +34,9 @@ void RemoteTargetExternal::create() {
int PipeFD[2][2];
pid_t ChildPID;
- pipe(PipeFD[0]);
- pipe(PipeFD[1]);
+ // Create two pipes.
+ if (pipe(PipeFD[0]) != 0 || pipe(PipeFD[1]) != 0)
+ perror("Error creating pipe: ");
ChildPID = fork();
More information about the llvm-commits
mailing list