Skip to content

Add "kill" command to terminate background exec #242

Closed
@kortschak

Description

@kortschak

I am using testscript to test the behaviour of a program that is not intended to terminate in production. I would like to examine its output while running for a period, but it is not possible to obtain stdout/stderr until a background exec has terminated. To achieve this I would like to be able to

cmd &name&
sleep 1s
kill name
wait name # depending on implementation of kill this may or may not be necessary.

stdout <pattern>
stderr <pattern>

I am able to add the sleep, but access to the exec's termination details are not exposed, so the script cannot terminate the exec unless invoking stop, which would defeat the test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions