Forum: Ruby Ruby script won't terminate when run with sudo

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
45232ee28a5464660509e820cc73fb21?d=identicon&s=25 Montana Burr (moonman239)
on 2014-05-07 23:14
I have a script that binds a socket to a port.  It needs root privileges
to do this.  The problem is if I run it as root, then if I want to
terminate the script, I have to run pkill as root.  I understand that
this is because the process "ruby" is owned by root, not by me.

Is there an easy way to give the script root privileges without allowing
root to own the process?
This topic is locked and can not be replied to.