Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The exit status of a killed process should be None #21

Open
raczben opened this issue Dec 6, 2019 · 0 comments
Open

The exit status of a killed process should be None #21

raczben opened this issue Dec 6, 2019 · 0 comments
Labels
bug Something isn't working low-prio

Comments

@raczben
Copy link
Owner

raczben commented Dec 6, 2019

Describe the bug
The exit status of a killed process should be None

To Reproduce

import wexpect
import time

def test_expect_wait_after_termination():
    """Ensure wait on a process terminated by kill -9.
    based on IsAliveTestCase::test_expect_wait_after_termination()"""
    
    p = wexpect.spawn('sleep 3')
    assert p.isalive()
    p.kill(9)
    time.sleep(1)

    # when terminated, the exitstatus is None, but p.signalstatus
    # and p.terminated reflects that the kill -9 nature.
    exitstat = p.wait()
    print('exitstat: {}'.format(exitstat))
    assert exitstat is None
        
test_expect_wait_after_termination()

Expected behavior
The exit status of a killed process should be None

Environment:

  • OS Name Microsoft Windows 10 Home
  • Version 10.0.18362 Build 18362
  • Python 3.7.5
  • wexpect v2.3.9
@raczben raczben added bug Something isn't working low-prio labels Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working low-prio
Projects
None yet
Development

No branches or pull requests

1 participant