mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-12 04:23:04 +01:00
3abdb1fc23
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.
46 lines
771 B
C++
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
|