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?

From "Peter H. Coffin" <hellsop@ninehells.com>
Newsgroups comp.lang.php
Subject Re: Using exec with & - what might I get back?
Date 2011-04-25 10:18 -0500
Organization A noiseless patient Spider
Message-ID <slrnirb469.2mh.hellsop@nibelheim.ninehells.com> (permalink)
References <timstreater-545AAF.12031324042011@news.individual.net>

Show all headers | 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