Set umask in child process doesn't work
I can't set umask using a shell script.
begin sample script
#!/usr/local/bin/tcsh -f
umask 002
xterm &
end
enter "umask" in the child proces, xterm in this case, and it returns '22'. I've tried it with bash and got the same results. Also tried starting xterm with 'exec xterm', '/usr/bin/env xterm' and 'exec /usr/bin/env xterm'. Also tried it with KDE's 'konsole' but got no luck there.
I can set it in my ~/.cshrc file but that is not a solution. This needs to work for everyone on the network and I don't control everyones ~/.cshrc file.
All documentation I've read said that child process inherit umask. That doesn't seem to be the case. What am I doing wrong?
|