poco/Foundation/testsuite/src/ProcessTest.h
Mike Gelfand 3abdb1fc23 Return non-zero from ProcessHandle::wait if killed by signal
Currently, ProcessHandle::wait (and transitively Process::wait) on *NIX
return zero if process was terminated as a result of unhandled signal.
Check if this is the case and return negative signal number instead to
indicate non-graceful process termination.
2015-10-03 15:32:15 +03:00

46 lines
771 B
C++

//
// ProcessTest.h
//
// $Id: //poco/1.4/Foundation/testsuite/src/ProcessTest.h#2 $
//
// Definition of the ProcessTest class.
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef ProcessTest_INCLUDED
#define ProcessTest_INCLUDED
#include "Poco/Foundation.h"
#include "CppUnit/TestCase.h"
class ProcessTest: public CppUnit::TestCase
{
public:
ProcessTest(const std::string& name);
~ProcessTest();
void testLaunch();
void testLaunchRedirectIn();
void testLaunchRedirectOut();
void testLaunchEnv();
void testIsRunning();
void testSignalExitCode();
void setUp();
void tearDown();
static CppUnit::Test* suite();
private:
};
#endif // ProcessTest_INCLUDED