By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,168 Members | 2,598 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,168 IT Pros & Developers. It's quick & easy.

How can I pre-emptively check whether a kill call will cause an exception?

P: 1
Part of my solution is a task manager-like GUI. I'd like the ability to indicate to the user which processes they can't use my "kill button" to kill pre-emptively, so they don't even bother.

Is there a way to check this without actually killing anything? e.g. a try..catch would require an actual call to kill, which I don't want.

I've looked into permissions a bit, and I notice that permission to kill is always a "1" in the 1s digit of a hexadecimal sum that represents the entire set of permissions, meaning if I knew how to access it, I could see if it mod 2 = 0 and I'd know right away that permission to kill is denied.

Any help would be much appreciated!
Oct 24 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.