NYCPHP Meetup

NYPHP.org

[nycphp-talk] system() call timeout

Tim Sailer sailer at bnl.gov
Wed Oct 12 11:46:08 EDT 2005


On Wed, Oct 12, 2005 at 10:42:22AM -0500, Jeffrey O. Stevison wrote:
> Is there a way to set a timeout value for a system("ls -l") call?  If  
> the ls command hangs for at least 5 secs I want to term the call and  
> have some return value that indicates the process has termed.

Not that I've found. I've been using the $dirhandle=opendir('xx');
$filename=readdir($dirhandle); method of picking out files.

Tim

-- 
Tim Sailer <sailer at bnl.gov> 
Information and Special Technologies Program
Office of CounterIntelligence 
Brookhaven National Laboratory  (631) 344-3001



More information about the talk mailing list