2

I have several child processes running independent tasks, and from time to time one of them needs to ask for human input on the terminal. The code uses a terminal input/output lock to make sure that it is safe to do so. However, as I discovered, stdin is disabled in child processes in multiprocessing.

I've looked around and I have found this way of doing it:

Python user input in child process

There are a few other threads from around 2010-2012, suggesting essentially the same solution. However, the answer is almost 10 years old and Python has changed a bit since then. Is there any more "modern" way of doing it?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.