PDA

View Full Version : QProcess and umask



skyphyr
15th March 2007, 19:29
Hi All,

I've got some code which launches a program with QProcess (http://sf.net/projects/splish)

The program run by QProcess does not have the same umask settings as my Qt application does. I grab the environment with QProcess::systemEnvironment();, but I guess this is only getting the environment variables. Any idea how I ensure umask settings survive - I only saw mention of how to set them in the QProcess docs, not how to leave them alone.

Cheers,

Alan.

wysota
15th March 2007, 22:39
What exactly happens with the mask? The child process should inherit the mask.

skyphyr
16th March 2007, 12:13
Hi Wysota,

It's set to 0000 (I know this is a bad thing Tm) but when the application executes it does everything with 0022

Cheers,

Alan.

wysota
16th March 2007, 13:38
Meaning that you can't use/set write permissions for group and other? Could you show us the code used to set the mask and the one that tells you the mask is different than you set before?

skyphyr
16th March 2007, 17:09
Hi Wysota - I haven't used any code to set it - the files created had different permissions from the umask.

Will do some more investigation - it may have been the program I launched, not Qt.

Cheers,

Alan.

wysota
16th March 2007, 19:05
Correct me if I'm wrong but it's not only the umask that decides about default permissions of files created.