Results 1 to 6 of 6

Thread: QProcess and umask

  1. #1
    Join Date
    Nov 2006
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QProcess and umask

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QProcess and umask

    What exactly happens with the mask? The child process should inherit the mask.

  3. #3
    Join Date
    Nov 2006
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QProcess and umask

    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.
    Last edited by skyphyr; 16th March 2007 at 11:37.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QProcess and umask

    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?

  5. #5
    Join Date
    Nov 2006
    Posts
    20
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QProcess and umask

    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.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QProcess and umask

    Correct me if I'm wrong but it's not only the umask that decides about default permissions of files created.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.