Replies: 2 comments
-
https://stackoverflow.com/questions/2935183/bash-infinite-sleep-infinite-blocking |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can run |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
On my desktop, I'm usually executing multiple processes in the same container via
podman exec
for a variety of reasons (mainly because I use https://cnest.readthedocs.io). More often than not, the initial process started viapodman start
(orpodman run
) is to do absolutely nothing other than run in the background and wait to be stopped.To date, I've been running
sleep +Inf
as this "null" background process. But I get a side effect of needing to run with--pid=host
. If I don't thenpodman stop
takes 10 seconds, whereas with--pid=host
it stops immediately. Detailed example below.Is there a better and more proper choice for background process? I actually don't mind using
--pid=host
but somehowsleep +Inf
smells like there's some better approach I should be taking for a "null" background process.(Note: I understand that Linux namespaces need some process. Regardless, I'm often finding myself having no use for this process other than to just have a process for the Linux namespace.)
Beta Was this translation helpful? Give feedback.
All reactions