Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: patricide / matricide

by athomason (Curate)
on Mar 10, 2001 at 04:34 UTC ( #63413=note: print w/ replies, xml ) Need Help??

in reply to patricide / matricide

Try the builtin getppid.

I just looked at what you're doing more closely, and I'm a bit curious about how you intend to guarantee that your kill call actually gets executed. A crafty user (if there are any trying to subvert your desires), could potentially interrupt or kill your script before it gets to the end, leaving them with an open shell. If your script is such that they'll never get the opportunity to do something like that, then you'll be fine. But just in case, you may want to toss in some signal handlers (e.g. SIGINT, SIGKILL, etc) that kills the shell as well.

Comment on Re: patricide / matricide
Replies are listed 'Best First'.
Re: Re: patricide / matricide
by dshahin (Pilgrim) on Mar 10, 2001 at 04:46 UTC
    I am supposed to trust my users to some degree.
    I know, I know....
    I just want to make sure they don't accidentally escape to a shell with a ctrl-d or exit
      SECURITY RULE NUMBER ONE : Trust nobody !

      You should never trust a user nor any data and barely a program if you want to have a minimal security...

      "Trying to be a SMART lamer" (thanx to Merlyn ;-)
        yes, I understand. but in this particular instance, I have been given orders to trust the user to some degree.

        I'm only interested in catching honest mistakes....

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://63413]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2015-10-13 13:16 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (307 votes), past polls