Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: patricide / matricide

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


in reply to patricide / matricide

Try the builtin getppid.

Update:
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.

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-19 15:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found