Issue 26480: add a flag that will not give the set a sys.stdin
i have Fatal Error "Py_Initialize: can't initialize sys standard streams" because fail to create fd = fileno(stdin); std = create_stdio(iomod, fd, 0, "<stdin>", encoding, errors); I do not need to create this input|output if i comment this code, and setup __stdin__= None __stdout__= None __stderr__= None all workin fine
create_stdio() checks if the file descriptor is valid:
if (!is_valid_fd(fd))
Py_RETURN_NONE;
This function is_valid_fd() has been fixed recently on FreeBSD.
It's unclear to me why and how Python fails to create standard streams. Without more information, we cannot investigate. But since this issue has no activity for 3 years, I close. Reopen it if you still reproduce the issue and you can provide more information.
In the meanwhile, I suggest you to test the first alpha releases of Python 3.8.