diff options
Diffstat (limited to 'test/testprog.cc')
-rw-r--r-- | test/testprog.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/testprog.cc b/test/testprog.cc index dbfb665..faf1498 100644 --- a/test/testprog.cc +++ b/test/testprog.cc @@ -1,8 +1,7 @@ #include <iostream> #include <fstream> #include <string> - -extern const char **environ; // see 'man environ' +#include <signal.h> int main(int argc, const char* argv[]) { @@ -40,6 +39,11 @@ int main(int argc, const char* argv[]) abort(); } + if(cmd == "segfault") + { + raise(SIGSEGV); + } + if(cmd == "throw") { throw "ouch"; |