summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Program.inc
Commit message (Collapse)AuthorAgeFilesLines
* add some triple for minix, patch by Kees van Reeuwijk from PR7582Chris Lattner2010-07-071-1/+1
| | | | llvm-svn: 107785
* Fix -Wcast-qual warnings.Dan Gohman2010-04-191-6/+10
| | | | llvm-svn: 101782
* avoid temporary std::string in non posix_spawn path.Chris Lattner2010-04-181-4/+4
| | | | llvm-svn: 101723
* Eliminate temporary string.Benjamin Kramer2010-04-181-4/+4
| | | | llvm-svn: 101711
* Properly inherit the environment on darwin where environ is not available ↵Benjamin Kramer2010-04-181-1/+6
| | | | | | for shared libraries. llvm-svn: 101710
* This is horrible. Split the difference, and declare 'environ' on all non-DarwinNick Lewycky2010-04-181-0/+7
| | | | | | | platforms to unbreak the darwin and linux builds. The BSD folks should feel free to change the #if, if this breaks them. llvm-svn: 101703
* Revert r101701, Darwin doesn't have 'environ'. Go figure.Nick Lewycky2010-04-181-3/+0
| | | | llvm-svn: 101702
* Fix linux build. posix_spawn doesn't inherit the environment by default.Nick Lewycky2010-04-181-1/+4
| | | | llvm-svn: 101701
* make Program::Execute use posix_spawn on systems that support it,Chris Lattner2010-04-181-9/+64
| | | | | | | | | as it is more efficient than fork/exec. Thanks to Eric for adding the autoconf check. It would be nice if a cmake guru could add a cmake check for posix_spawn as well. llvm-svn: 101693
* improve haiku portability, patch by Paul Davey.Chris Lattner2010-04-101-0/+2
| | | | llvm-svn: 100933
* don't forget to close a FD on an error condition, found byChris Lattner2010-03-141-1/+2
| | | | | | cppcheck, PR6617. Patch by Ettl Martin! llvm-svn: 98525
* improve support for minix, PR6280, patch byChris Lattner2010-02-121-1/+1
| | | | | | Kees van Reeuwijk! llvm-svn: 95946
* Add llvm::Program::ChangeStderrToBinary().Douglas Gregor2010-01-281-0/+5
| | | | llvm-svn: 94743
* Revert commit 81144, and add a comment. It caused bugpoint timeoutsDuncan Sands2009-11-081-3/+9
| | | | | | not to work any more on linux. llvm-svn: 86481
* Use 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' ↵Ted Kremenek2009-10-221-1/+1
| | | | | | | | | | | prevents it being correct within a multithreaded context. This address: PR 5277 (Program::Wait is unsafe to call from multiple threads). Note: If waitpid() turns out to be non-portable, we can add more autoconf magic, or look into another solution. llvm-svn: 84903
* Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaksDaniel Dunbar2009-09-221-5/+18
| | | | | | ExecuteAndWait. llvm-svn: 82522
* Get rid of GetProcessId in Win32/Program.inc.Mikhail Glushenkov2009-09-151-18/+5
| | | | | | | GetProcessId was introduced only in XP. As a bonus, this change makes Program objects copyable, since Program is now basically a PID. llvm-svn: 81826
* Check that the 'kill' call succeeded.Mikhail Glushenkov2009-09-091-1/+7
| | | | | | Thanks to Duncan Sands for spotting this. llvm-svn: 81328
* This should unbreak the build on 64-bit Linux.Mikhail Glushenkov2009-09-081-3/+6
| | | | llvm-svn: 81252
* Const-correctness.Mikhail Glushenkov2009-09-081-1/+1
| | | | llvm-svn: 81249
* Get rid of the Pid_ member in the Program class.Mikhail Glushenkov2009-09-081-6/+11
| | | | llvm-svn: 81247
* Add a Kill() function to the Program class.Mikhail Glushenkov2009-09-081-0/+10
| | | | llvm-svn: 81246
* Using a signal handler that does nothing should beDuncan Sands2009-09-071-6/+2
| | | | | | equivalent to SIG_IGN. llvm-svn: 81144
* Remove some not-really-used variables, as warnedDuncan Sands2009-09-061-3/+0
| | | | | | about by icc (#593, partial). Patch by Erick Tryzelaar. llvm-svn: 81115
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-2/+2
| | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. llvm-svn: 79869
* Update a comment to reflect the current code.Dan Gohman2009-08-051-1/+2
| | | | llvm-svn: 78215
* Remove needless uses of std::flush in the parent process after aDan Gohman2009-08-051-7/+0
| | | | | | | fork call. This eliminates a need for <iostream>. Also remove needless fsync calls. llvm-svn: 78131
* Use _exit rather than exit in the child process after a failed exec.Dan Gohman2009-08-051-3/+7
| | | | | | Add a comment explaining why. llvm-svn: 78128
* Follow Unix behavior and return 127 if the command is not found,Dan Gohman2009-08-041-1/+1
| | | | | | and 126 if it is not executable. llvm-svn: 78120
* When exec() fails, return 127 instead of errno; the parent process has no way toDaniel Dunbar2009-08-041-3/+3
| | | | | | | distinguish that the result is errno, so it can't use it to provide more information about the error (it also exposes the numeric value of errno). llvm-svn: 78098
* Fix a race condition in getting the process exit code on Win32.Daniel Dunbar2009-08-031-0/+4
| | | | llvm-svn: 77953
* On "Unix", if Program::FindProgramByName is given a name containingDan Gohman2009-07-281-1/+1
| | | | | | | slashes, just go with it, regardless of whether it looks like it will be executable. This follows the behavior of sh(1) more closely. llvm-svn: 77396
* Fix a fixme; don't take binaries from the working directory.Benjamin Kramer2009-07-281-3/+3
| | | | | | | This fixes clang on non-darwin platforms if a file called 'ld' or 'as' is in the working directory. Based on patch by Pawel Worach! llvm-svn: 77379
* Remove duplication in Program::Execute{And,No}Wait.Mikhail Glushenkov2009-07-181-87/+29
| | | | | | | Implemented by moving the code out of static functions into methods of Program class. llvm-svn: 76340
* Trailing whitespace.Mikhail Glushenkov2009-07-171-15/+15
| | | | llvm-svn: 76229
* Add an ExecuteNoWait interface to support asynchronous process spawning.David Greene2009-07-081-0/+72
| | | | llvm-svn: 75055
* Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:Daniel Dunbar2009-04-201-1/+1
| | | | | | | | | | | | | | | | | clang: error: unable to make temporary file: /etc/cc: can't make unique filename: Permission denied instead of clang: error: unable to make temporary file: /etc/cc: can't make unique filenamePermission denied for example. Also, audited the uses of MakeErrMsg to make the prefix strings consistent (not end with newline/punctuation/space/": "). llvm-svn: 69626
* Fix redirection of stderr in sys::Program::ExecuteAndWait. There was logicMatthijs Kooijman2008-06-121-4/+11
| | | | | | | | | | | | | error that caused it to redirect stderr to stdout too often. This fix is applied identically to the win32 code as well, but that is untested. --Thi line, and those below, will be ignored-- M System/Unix/Program.inc M System/Win32/Program.inc llvm-svn: 52233
* Make I/O redirection handling in sys::Program a bit more consistent. NoMatthijs Kooijman2008-06-121-21/+13
| | | | | | | | | | | | | functional changes. Win32 code is untested, but should work fine. In the unix variant, rename RedirectFD to RedirectIO and let that function handle empty and null paths instead of doing that in the caller 3 times. This is the same as win32 already does it. In the win32 variant, use Path::isEmpty() instead of checking the resulting c_str() manually. This is the same as unix already does it. llvm-svn: 52230
* Unbreak build.Bill Wendling2008-05-291-3/+3
| | | | llvm-svn: 51709
* Remove more iostream header includes. Needed to implement a "FlushStream"Bill Wendling2008-05-291-3/+3
| | | | | | function to flush a specified std::ostream. llvm-svn: 51705
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-1/+1
| | | | llvm-svn: 50659
* Set error message.Devang Patel2008-02-041-2/+4
| | | | | | Patch by Shantonu Sen. llvm-svn: 46715
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Remove spurious consts. This fixes warnings with compilers thatDan Gohman2007-09-141-2/+2
| | | | | | are strict about such things. llvm-svn: 41956
* Solaris 2.x does not have RLIMIT_RSS, check for this symbol (analog NetBSD ↵Gabor Greif2007-07-061-1/+1
| | | | | | below), should subsume Cygwin llvm-svn: 37939
* Fix LLVM build on NetBSD. Patch by Neil Booth.Devang Patel2007-06-041-0/+2
| | | | llvm-svn: 37410
* Cygwin doesn't have the RSS_LIMIT for get/setrlimit.Reid Spencer2007-04-231-0/+2
| | | | llvm-svn: 36361
* Add possibility to set memory limit for binaries run via libSystem. ThisAnton Korobeynikov2007-02-161-0/+30
| | | | | | is especially needed for bugpoint. This partly implements PR688 llvm-svn: 34349
* For PR797:Reid Spencer2006-08-221-8/+13
| | | | | | | Fix a bug in my last patch that botched file redirection by using explicit scoping of if statements. llvm-svn: 29815
OpenPOWER on IntegriCloud