Skip to content

If control of shell is not reobtained quickly after a stop-on-signal, a timeout raises (Spurious Timeout after stop-on-silence) #228

@eldipa

Description

@eldipa

Describe the bug
A clear and concise description of what the bug is followed by the steps to reproduce it:

  1. Be the following c.sh (add exec permission)
#!/bin/bash
trap 'echo INT ; sleep 2 ; echo Bye' INT
echo Start
sleep 3
echo BOOM
  1. Be the following a.md (wrap it in a shell code-fenced block)
$ ./c.sh          # byexample: +timeout=10 +stop-on-silence +stop-signal=interrupt
Start
  1. Run byexample -l shell a.md'
  2. See error

Expected behavior
No error should happen. The test should PASS.

Observed behavior

File "a.md", line 3
Failed example:
    ./c.sh          # byexample: +timeout=10 +stop-on-silence +stop-signal=interrupt
=> Execution timedout at example 1 of 1.
- This could be because the example just ran too slow (try add more time
with +timeout=<n>) or the example is "syntactically incorrect" and
the interpreter hang (may be you forgot a parenthesis or something like that?).
- This is the last output obtained:
Start
INT

[w] Example timed out. Trying to recovering the control (shell)...
[w] Recovering control of shell failed.

byexample version
byexample 10.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugout of sync between the code and the docs; something that should be fixed in the near future

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions