Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #1288

Re: Using exec with & - what might I get back?

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" <hellsop@ninehells.com>
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 <slrnirb469.2mh.hellsop@nibelheim.ninehells.com> (permalink)
References <timstreater-545AAF.12031324042011@news.individual.net>
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

Show key headers only | View raw


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

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Using exec with & - what might I get back? Tim Streater <timstreater@waitrose.com> - 2011-04-24 12:03 +0100
  Re: Using exec with & - what might I get back? "Peter H. Coffin" <hellsop@ninehells.com> - 2011-04-25 10:18 -0500
    Re: Using exec with & - what might I get back? Tim Streater <timstreater@waitrose.com> - 2011-04-25 19:11 +0100

csiph-web