Code Monkey home page Code Monkey logo

Comments (4)

pda avatar pda commented on May 31, 2024

Oh, right…

finally:
    if args.kill_all_on_exit:
        kill_all_processes(KILL_ALL_PROCESSES_TIMEOUT)
def kill_all_processes(time_limit):
    info("Killing all processes...")
    try:
        os.kill(-1, signal.SIGTERM)

That'd do it :)

It's possible that my_init should only kill its own child / descendant processes. But in the normal use-case, that's the entire system, so perhaps there's no need to add that complexity.

from baseimage-docker.

FooBarWidget avatar FooBarWidget commented on May 31, 2024

Yes. Don't run my_init except in a container. It's specifically designed for use in a Docker container.

from baseimage-docker.

FooBarWidget avatar FooBarWidget commented on May 31, 2024

I tend to test my_init like this:

docker run -t -i -v `pwd`/image:/image phusion/baseimage:xxx /image/my_init [...]

from baseimage-docker.

pda avatar pda commented on May 31, 2024

Makes sense :)

from baseimage-docker.

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.