Apache Server configuration support - Users kill own proceses created by them only

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > May 2006 > Users kill own proceses created by them only





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Users kill own proceses created by them only
Dave (from the UK)

2006-05-30, 1:16 pm

Consider this:

A CPU intensive application is started from a browser. Under some
circumstances this can get out of hand and it is useful the person who
stared it to be able to kill it.

The following web page has a 'kill' button, which executes

http://witm.sourceforge.net/witm.php

pkill -u nobody MathKernel ; sleep 1; pkill -u nobody -9 MathKernel


The problem is, that will kill any MathKernel process running that was
stared by the web server, not just that stared by the person who presses
the kill button.

I was thinking of something along the lines of

1) Add 1000 users, with UIDs in the range A <= uid <= A+999.
2) Convert IP address to a number in the range A to A+ 999.
3) Use suexec to start the process with a unique UID (okay, there are
only 1000 UIDs and lots of IPs, but it would work on low-traffic servers).
User can only kill processes with the uid his IP maps to.

I suspect there is another (probably better) solution, but I've not
really got a clue.


--
Dave K MCSE.

MCSE = Minefield Consultant and Solitaire Expert.

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.

http://witm.sourceforge.net/ (Web based Mathematica frontend)
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com