Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Peter H. Coffin" Newsgroups: comp.lang.php Subject: Re: Using exec with & - what might I get back? Date: Mon, 25 Apr 2011 10:18:33 -0500 Organization: A noiseless patient Spider Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx03.eternal-september.org; posting-host="le/2G4+BNpieVhQI6uJ2Lw"; logging-data="12438"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Xi+FLLob5NicNJGqoUBZZ" User-Agent: slrn/0.9.9p1 (OpenBSD) Cancel-Lock: sha1:JJnVzPwlTMxggsn95/1cfpm8cEQ= Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:1288 On Sun, 24 Apr 2011 12:03:13 +0100, Tim Streater wrote: > If I do this: > > exec ("/path/to/some/prog &", $results, $status); > > will I ever get anything at all back in $results and $status? Or will > $results always be empty and $status always zero? If /path/to/some/prog is startable (executable, parses, etc.), I wouldn't expect any useful outcome in $results or $status. Essentially, you're asking it to go into the background. If you want to wait around for results, you'll have to drop the &. If you want to check back later, that's outside the scope of this question; you'll have to write /path/to/some/prog to report back by other means. -- 59. I will never build a sentient computer smarter than I am. --Peter Anspach's list of things to do as an Evil Overlord