Git Product home page Git Product logo

Comments (5)

saschahauer avatar saschahauer commented on June 27, 2024

It turned out I end microcom with Ctrl-\ Ctrl-c. In this case the Ctrl-c is no longer delivered to microcom (which would then restore the terminal settings), but to Python, which then prints the backtrace. microcom is then ended without the signal handler being executed and the terminal may be garbled.
I'll have to reprogram my fingers to end microcom with Ctrl-\ Ctrl-\ and this problem does not show up

from labgrid.

jluebbe avatar jluebbe commented on June 27, 2024

Would this work better if labgrid would send SIGTERM to the microcom process?

from labgrid.

saschahauer avatar saschahauer commented on June 27, 2024

Look at /usr/lib/python3.5/subprocess.py:249:

def call(*popenargs, timeout=None, **kwargs):
"""Run command with arguments. Wait for command to complete or
timeout, then return the returncode attribute.

The arguments are the same as for the Popen constructor.  Example:

retcode = call(["ls", "-l"])
"""
with Popen(*popenargs, **kwargs) as p:
    try:
        return p.wait(timeout=timeout)
    except:
        p.kill()
        p.wait()
        raise

Here is the problem: Both python and microcom receive the Ctrl-C. If python comes to first handle the Ctrl-C then microcom will be killed and thus cannot cleanup the terminal

from labgrid.

Emantor avatar Emantor commented on June 27, 2024

@saschahauer is this a still a problem that needs a workaround? Otherwise I'll close this issue.

from labgrid.

Emantor avatar Emantor commented on June 27, 2024

Clsoing this as no longer requiring action

from labgrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.