def waitUpTo(self, timeoutSeconds, pollInterval=DEFAULT_POLL_INTERVAL):
    '''
        Popen.waitUpTo - Wait up to a certain number of seconds for the process to end.

            @param timeoutSeconds <float> - Number of seconds to wait

            @param pollInterval <float> (default .05) - Number of seconds in between each poll

            @return - Returncode of application, or None if did not terminate.
    '''
    i = 0
    numWaits = timeoutSeconds / float(pollInterval)

    ret = self.poll()
    if ret is None:
        while i < numWaits:
            time.sleep(pollInterval)
            ret = self.poll()
            if ret is not None:
                break
            i += 1

    return ret