Changing priority and overcoming kill

A

! aaa

1. Is there a way to relinquish "root" privs in a script, or, some way to
let a "nobody" script listen on ports <1024 easily ?

2. I've got some code which runs in the background (uses fork() inside to do
this automatically) and the background code kicks off another process (a
compiled application in C) - and I'm having some problems with this:-

If I "kill" the C application, the perl code also gets a kill signal from
somewhere (and so does the code which originally started the perl code too,
if it wasn't run manually!)

What is the correct way to "orphan" a chunk of code so that none of its
parents can suffer related signals later ?
Is there a way to run some other process without being the parent of that
process?

I'm using RedHat BTW.
 
B

Ben Morrow

Quoth " ! aaa said:
1. Is there a way to relinquish "root" privs in a script, or, some way to
let a "nobody" script listen on ports <1024 easily ?

See perlvar, in particular $<, $>, $( and $).
See also your system documentation for setr?e?s?[ug]id.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,404
Latest member
PerryRutt

Latest Threads

Top