char **argv_pyi = NULL;
  int argc_pyi = 0;

- move these variables to the pyi_utils_create_child() too - making local variables - then you will not hide accessing global variables.
- my thinking is "argv are passed in pyi_utils_create_child() further then why not to prepare argv for the child in this function?"
- you will need also to pass argc to pyi_utils_create_child().