Git Product home page Git Product logo

Comments (4)

krallin avatar krallin commented on June 6, 2024

Hi there,

This may be a strange request, but we'd like to use tini to control a non-daemon aware process. However, we're using a container that starts up multiple services (for legacy reasons) and controls them via daemontools.

I'm not entirely sure why you need to use TIni here. Can you perhaps clarify what you mean by "control" and "non-daemon aware"?

Currently, since tini always puts every controlled process into its own process group, this doesn't work for us.

As it turns out, older versions of Tini don't wrap their children into a process group.

I think you might want to try one of those, and let me know whether it works for you and does what you need it to do.

Specifically, you should try v0.7: https://github.com/krallin/tini/releases/tag/v0.7.0, which is the latest release before process groups were added.

Any suggestions? (happy to submit a pull request if you think it would make sense to add an option like this).

Provided the above works for you, and I can better understand what this is useful for here, I'd be happy to add or merge in a flag for this.

Thanks!

from tini.

evantorrie avatar evantorrie commented on June 6, 2024

I'm not entirely sure why you need to use TIni here. Can you perhaps clarify what you mean by "control" and "non-daemon aware"?

Yes, maybe control and non-daemon aware are the wrong terms here.

What we need is some process that will pass on signals from daemontools to its child (our process), and that collects zombies from processes that may be forked from the child. Currently our child process is an opensource piece of software that we don't want to change to put in signal handling, zombie collection etc. tini sounded reasonably well-suited to this.

The only wrinkle was the need for tini to be in the same process group as the child (and any of its children).

As it turns out, older versions of Tini don't wrap their children into a process group.

I think you might want to try one of those, and let me know whether it works for you and does what you need it to do.

Yes, let me take a look at v0.7

Also, let me know whether you think tini still makes sense for the use case mentioned here?

from tini.

krallin avatar krallin commented on June 6, 2024

I'm not entirely sure why you need to use TIni here. Can you perhaps clarify what you mean by "control" and "non-daemon aware"?

Yes, maybe control and non-daemon aware are the wrong terms here.

What we need is some process that will pass on signals from daemontools to its child (our process), and that collects zombies from processes that may be forked from the child. Currently our child process is an opensource piece of software that we don't want to change to put in signal handling, zombie collection etc. tini sounded reasonably well-suited to this.

Yes; that make sense. Just make sure you run Tini in subreaper mode (-s), otherwise zombies won't be re-parented to it. If you don't add it, Tini should yell at you to do so anyway.

That being said, you could could also run Tini as the parent of daemontools (which may or may not require the subreaper flag depending on whether Tini is then PID 1.).

As it turns out, older versions of Tini don't wrap their children into a process group.
I think you might want to try one of those, and let me know whether it works for you and does what you need it to do.

Yes, let me take a look at v0.7

👍

Also, let me know whether you think tini still makes sense for the use case mentioned here?

Yes, provided you use the subreaper flag (-s). That being said, you might want to just run Tini at the top of your process hierarchy if that's an option.

from tini.

krallin avatar krallin commented on June 6, 2024

(I should mention that subreaper support only works on Linux >= 3.4)

from tini.

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.