Backport !1968 “gspawn: Fix file descriptor conflation issues” to glib-2-70
Trivial backport of some of the patches from !1968 (merged) to glib-2-70
to fix #2506 (closed) and #2503 (closed) without implementing support for FD remapping on the posix_spawn()
code path or changing any translatable strings.
Fixes #2506 (closed) Fixes #2503 (closed)