getuid() returns real process id not effective (closes #22307)