summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix/Signals.inc
Commit message (Collapse)AuthorAgeFilesLines
* Merge System into Support.Michael J. Spencer2010-11-291-303/+0
| | | | llvm-svn: 120298
* CrashRecovery: Fix raise() override to actually send the right signal, *cough*.Daniel Dunbar2010-10-081-1/+1
| | | | llvm-svn: 116072
* CrashRecovery/Darwin: Override raise() as well so that crash recovery doesn'tDaniel Dunbar2010-09-221-1/+5
| | | | | | | end up altering the thread on which crashes are done because of its use of Darwin's broken raise() implementation. llvm-svn: 114558
* Add an interface for unregistering a file from the FilesToRemove list.Dan Gohman2010-09-011-0/+10
| | | | llvm-svn: 112705
* CrashRecovery/Darwin: On Darwin, raise sends a signal to the main thread insteadDaniel Dunbar2010-08-191-0/+34
| | | | | | | | | of the current thread. This has the unfortunate effect that assert() and abort() will end up bypassing our crash recovery attempts. We work around this for anything in the same linkage unit by just defining our own versions of the assert handler and abort. llvm-svn: 111583
* Factor out the handler work from SignalHandler into a helper function,Dan Gohman2010-05-271-5/+12
| | | | | | | | | and change llvm::sys::RunInterruptHandlers to call that function directly instead of calling SignalHandler, because the rest of SignalHandler invokes side effects which aren't appropriate, including raising the signal. llvm-svn: 104896
* Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanupDaniel Dunbar2010-05-081-1/+3
| | | | | | stuff. llvm-svn: 103333
* Fix a false-positive memory leak in code using RemoveFileOnSignal(). BecauseJeffrey Yasskin2010-03-171-17/+10
| | | | | | | | libstdc++'s std::string class points to the interior of an allocation, valgrind reports strings still alive at program termination as possible leaks. I didn't use a ManagedStatic for this because System can't depend on Support. llvm-svn: 98716
* follow-on to PR6280Chris Lattner2010-02-141-1/+1
| | | | llvm-svn: 96172
* improve support for minix, PR6280, patch byChris Lattner2010-02-121-1/+10
| | | | | | Kees van Reeuwijk! llvm-svn: 95946
* Most stack straces don't need 3 digits worth of levels.Dan Gohman2009-10-301-1/+1
| | | | llvm-svn: 85575
* Add locking around signal handler registration.Owen Anderson2009-08-171-0/+14
| | | | llvm-svn: 79254
* fix PR3965:SIGINT handler not restored after calling ParseAST(),Chris Lattner2009-04-121-1/+2
| | | | | | patch by Alexei Svitkine! llvm-svn: 68929
* fix a bug Alexei Svitkine pointed out.Chris Lattner2009-03-231-2/+2
| | | | llvm-svn: 67510
* When we restore signal handlers, restore them back to what theyChris Lattner2009-03-231-8/+30
| | | | | | | were when we came around, not to their default handler. This should fix PR3848 llvm-svn: 67509
* factorize signal registration, part of PR3848.Chris Lattner2009-03-231-10/+23
| | | | llvm-svn: 67508
* add some explicit llvm:: qualifiers to the unix side, fix problems on the ↵Chris Lattner2009-03-081-4/+5
| | | | | | windows side. llvm-svn: 66386
* When a crash signal is delivered do two things: remove all of ourChris Lattner2009-03-071-5/+14
| | | | | | | | | signal handlers to prevent reentrance on unrelated things (a sigabort where the handle bus errors) also, clear the signal mask so that the signal doesn't infinitely reissue. This fixes rdar://6654827 - Crash causes clang to loop llvm-svn: 66330
* move some code to gracefully handle the case when a handler crashes.Chris Lattner2009-03-051-4/+6
| | | | llvm-svn: 66171
* Add a new 'AddSignalHandler' function to Signals.h that allowsChris Lattner2009-03-041-94/+68
| | | | | | | | | | | | | arbitrary functions to be run when a crash happens. Delete RemoveDirectoryOnSignal as it is dead and has never had clients. Change PrintStackTraceOnErrorSignal to be implemented in terms of AddSignalHandler. I updated the Win32 versions of these APIs, but can't test them. If there are any problems, I'd be happy to fix them as well. llvm-svn: 66072
* Use const, to support platforms where strrchr returns a const char *.Dan Gohman2009-02-101-2/+2
| | | | | | This fixes PR3535. llvm-svn: 64224
* Don't use plain %x to print pointer values. I had changed it from %pDan Gohman2008-12-051-1/+2
| | | | | | | | | since %p isn't formatted consistently, but obviously plain %x is wrong. PRIxPTR with a cast to uintptr_t would work here, but that requires inconvenient build-system changes. %lu works on all current and foreseable future hosts. llvm-svn: 60616
* Demangle and pretty-print symbols in internal backtraces. Patch byDan Gohman2008-12-051-0/+44
| | | | | | Wesley Peck, with a few fixes by me. llvm-svn: 60605
* Make PreVerifyID, IntSigsEnd, and KillSigsEnd const.Dan Gohman2008-05-141-2/+4
| | | | llvm-svn: 51088
* Fix more -Wshorten-64-to-32 warnings.Evan Cheng2008-05-051-1/+2
| | | | llvm-svn: 50659
* Make several symbols static.Dan Gohman2008-04-101-12/+12
| | | | llvm-svn: 49496
* Avoid calling array_endof in a static initializer, as it incursDan Gohman2008-03-211-2/+2
| | | | | | dynamic initialization. llvm-svn: 48666
* It is not safe to call fork in PrintStackTrace. Sometimes it freezes the ↵Lauro Ramos Venancio2008-02-151-44/+2
| | | | | | program. llvm-svn: 47161
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Add lengthof and endof templates that hide a lot of sizeof computations.Owen Anderson2007-09-071-3/+4
| | | | | | Patch by Sterling Stein! llvm-svn: 41758
* For PR1291:Reid Spencer2007-04-071-3/+9
| | | | | | Implement the PathWithStatus class and its use throughout lib/System. llvm-svn: 35742
* For PR789:Reid Spencer2007-03-291-2/+4
| | | | | | | | Make the sys::Path::getFileStatus function more efficient by having it return a pointer to the FileStatus structure rather than copy it. Adjust uses of the function accordingly. Also, fix some memory issues in sys::Path. llvm-svn: 35476
* For PR797:Reid Spencer2006-08-251-4/+9
| | | | | | | Make the Win32 code exception free (untested/uncompiled) which forced some interface changes which had ripple effect. This should be the last of 797. llvm-svn: 29884
* Remove extraneous #include.Reid Spencer2006-08-071-1/+0
| | | | llvm-svn: 29541
* Make the removal of files use Path::eraseFromDisk just like it does forReid Spencer2006-08-071-4/+5
| | | | | | | | | | | the removal of directories. Using std::remove is indiscriminate and can lead to the removal of things like /dev/null if run as root. The Path::eraseFromDisk method ensures that we only ever remove regular files or directories, but never character or block special nodes. This should clear up the problem with usage like: llvm-as -o /dev/null which is used in the llvm-test makefiles. llvm-svn: 29540
* Use getFileStatus instead of Path::isDirectory().Chris Lattner2006-08-011-7/+6
| | | | llvm-svn: 29443
* Only print the stack trace if it was requested. Previously, any call intoReid Spencer2006-06-161-1/+5
| | | | | | | | the Signals module that registered the handlers would cause the stack trace to be generated. Now, you must explicitly call PrintStackTraceOnErrorSignal in order for that to happen. llvm-svn: 28810
* Implement sys::SetInterruptFunction on Unix, stub it on win32 so that theChris Lattner2005-08-021-2/+18
| | | | | | build will not fail llvm-svn: 22578
* Final Changes For PR495:Reid Spencer2005-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This chagne just renames some sys::Path methods to ensure they are not misused. The Path documentation now divides methods into two dimensions: Path/Disk and accessor/mutator. Path accessors and mutators only operate on the Path object itself without making any disk accesses. Disk accessors and mutators will also access or modify the file system. Because of the potentially destructive nature of disk mutators, it was decided that all such methods should end in the work "Disk" to ensure the user recognizes that the change will occur on the file system. This patch makes that change. The method name changes are: makeReadable -> makeReadableOnDisk makeWriteable -> makeWriteableOnDisk makeExecutable -> makeExecutableOnDisk setStatusInfo -> setStatusInfoOnDisk createDirectory -> createDirectoryOnDisk createFile -> createFileOnDisk createTemporaryFile -> createTemporaryFileOnDisk destroy -> eraseFromDisk rename -> renamePathOnDisk These changes pass the Linux Deja Gnu tests. llvm-svn: 22354
* For PR495:Reid Spencer2005-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. llvm-svn: 22349
* Remove vim settings from source code; people should use llvm/utils/vim/vimrcMisha Brukman2005-05-051-1/+0
| | | | llvm-svn: 21704
* Silence gcc-4.0.0 warnings.Alkis Evlogimenos2005-04-221-4/+4
| | | | llvm-svn: 21453
* Rename Unix/*.cpp and Win32/*.cpp to have a *.inc suffix so that the sillyReid Spencer2005-01-091-0/+170
gdb debugger doesn't get confused on which file it is reading (the one in lib/System or the one in lib/System/{Win32,Unix}) llvm-svn: 19426
OpenPOWER on IntegriCloud