Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

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.

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.


Comment on Re: patricide / matricide
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
Node Status?
node history
Node Type: note [id://63413]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2014-09-01 08:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (299 votes), past polls