Results 1 to 5 of 5

Thread: kdesu in a kprocess - cant be killed

  1. #1
    Join Date
    Jan 2006
    Location
    germany
    Posts
    75
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question kdesu in a kprocess - cant be killed

    well the title really says it all.
    i have a kprocess that runs a command that starts with "kdesu -t -c" so that it runs as root; the problem is if i sigkill sigterm or sigint the process only the kdesu instance gets killed, not what it actually does.
    this happens although i start the process is runmode "OwnGroup" which means
    OwnGroup -- like NotifyOnExit, but the child process is started in an own process group (and an own session, FWIW). The behavior of kill() changes to killing the whole process group - this makes this mode useful for implementing primitive job management. It can be used to work around broken wrapper scripts that don't propagate signals to the "real" program. However, use this with care, as you disturb the shell's job management if your program is started from the command line
    doesnt the documentation claim that OwnGroup does exactly what i need it to?
    why does it not do it?
    thanks for any help!
    Quote Originally Posted by Bertolt Brecht
    What is the robbing of a bank compared to the founding of a bank?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: kdesu in a kprocess - cant be killed

    Quote Originally Posted by soul_rebel
    why does it not do it?
    Maybe because normal users can't kill processes owned by root?

  3. #3
    Join Date
    Jan 2006
    Location
    germany
    Posts
    75
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: kdesu in a kprocess - cant be killed

    Maybe because normal users can't kill processes owned by root?
    but shouldnt kdesu do a proper job-handling and term its children when it is terminated itself?
    how would i kill the process then? i dont want to run the entire app as root because i dont like giving root permissions to anything more than necessary -> not to the gui.
    i have looked into KDEsuClient but i dont think it can help me...
    is there way run part of the program with different previliges than the rest? (kProcess only offers you to drop previliges not to to assume more)

    when using suid apps one can use the difference between User ID and Effective User ID to do this (after starting the program seteuid to getuid and seteuid to 0 whenever a line of code has to be run as root, than back again), but when using kdesu both the real and the effective user id for the child process are 0....
    thanks for any help!
    Quote Originally Posted by Bertolt Brecht
    What is the robbing of a bank compared to the founding of a bank?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: kdesu in a kprocess - cant be killed

    Does it behave in the same way when you start kdesu from the console?

  5. #5
    Join Date
    Jan 2006
    Location
    germany
    Posts
    75
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: kdesu in a kprocess - cant be killed

    yes sigint or killing from konsole doesnt stop child process either...
    Quote Originally Posted by Bertolt Brecht
    What is the robbing of a bank compared to the founding of a bank?

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.