Re: PID needed to hammer squid

From: Date: Wed, 25 Aug 2004 17:31:31 +0000
Subject: Re: PID needed to hammer squid
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-194693@lists.php.net to get a copy of this message
Mário Gamito wrote:
Hi, I need to restart squid from PHP, but my squi doesn't stop because a lot of stupid errors. So, i need to kill it and then start it again.
killing a process owned by another user is a tough ask. The squid docs say you shouldn't run it as root and it also advice against using nobody - the user that typically own the apache process. How to make use of sudo/suexec/cron to overcome these issues have been discussed often in the past and you will find it in the archives. To answer your specific question on getting the PID. I would try looking in /var/run/squid.pid or executing pidof squid instead of trying to parse the output of ps.
squid     9283  0.0  1.0  8392 5060 ?        S    16:04   0:00 (squid) -D
-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar.

« previous php.general (#194693) next »