Comments (4)
Hi @0xc0d 👋 I wanted to let you know that I eventually managed to fix support for running containers detached with a -d/--detach
flag. See this PR and attached screenshot showing this working 👌
In the end I had to:
- Ensure important devices such as
/dev/null
were available in the container's filesystem. So I borrowed some code from GoNix to do thisCreateDevices()
once we're inside the new container's namespace and filesystem. - Set the SysProcAttr(s)
Pgid: 0
andSetpgid: true
in the parent process of the container -- That isrun.go
for me (probably similar for you) - Ensure that the container process (_the forked or init process, which for me is in
fork.go
and ends up being the parent process, or supervisor of the actual binary being run in the container/proc/self/exe
) actually waits on the container process. It is in fact the parent process, the one that sets things up (gun.go
for me) where you can start and essentially terminate, but obviously not without setting up the mentioned SysProgAttr(s) above so the process has its own process group and session.
Finally I think its also important not to attach the terminal's standard fds to any part of the process either.
from vessel.
Hi @prologic,
Thank you for your question. I just realized that my implementation was not alright.
For detaching you need to release the underneath process from the parent.
from vessel.
Hi @prologic,
Thank you for your question. I just realized that my implementation was not alright. For detaching you need to release the underneath process from the parent.
Yup 😅 Some of my code was/is inspired by your project and I realized this too, hence why I asked. Unfortunately it doens't seem to be as easy as "separate the process from the parent" 😅
from vessel.
from vessel.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vessel.