private function cleanSignals(array $values)
    {
        $cleanedValues = array();
        foreach ($values as $value) {
            if (is_string($value)) {
                $value = @constant($value);
                if (null === $value) {
                    throw new \InvalidArgumentException(sprintf('The value "%s" does not specify name of a PCNTL signal constant', $value));
                }
            }

            if (!is_int($value) || $value <= 0) {
                throw new \InvalidArgumentException(sprintf('The value "%s" is not a valid process signal value', $value));
            }

            $cleanedValues[] = $value;
        }

        return $cleanedValues;
    }