On 2/25/15 2:09 PM, Ali Çehreli wrote:
It looks like the file is closed when spawnProcess is finished. I don't
know whether it is done by spawnProcess explicitly or whether it is a
behavior for temporary files.
I know the problem is solved, but I wanted to chime in with some
explanation here:
On Wednesday, 25 February 2015 at 19:09:16 UTC, Ali Çehreli wrote:
On 02/25/2015 05:56 AM, wobbles wrote:
> Hi,
> Any reason why the following wont work?
>
> void main(string[] args)
> {
> auto pidIn = File.tmpfile();
> auto pidOut = File.tmpfile();
> auto pid = spawnProcess(["ls"
On 02/25/2015 05:56 AM, wobbles wrote:
> Hi,
> Any reason why the following wont work?
>
> void main(string[] args)
> {
> auto pidIn = File.tmpfile();
> auto pidOut = File.tmpfile();
> auto pid = spawnProcess(["ls", "./"], pidIn, pidOut,
> std.stdio.stdout, null, Config.newEnv);
>
On Wednesday, 25 February 2015 at 13:56:06 UTC, wobbles wrote:
Hi,
Any reason why the following wont work?
void main(string[] args)
{
auto pidIn = File.tmpfile();
auto pidOut = File.tmpfile();
auto pid = spawnProcess(["ls", "./"], pidIn, pidOut,
std.stdio.stdout, null, Config.newEnv
Hi,
Any reason why the following wont work?
void main(string[] args)
{
auto pidIn = File.tmpfile();
auto pidOut = File.tmpfile();
auto pid = spawnProcess(["ls", "./"], pidIn, pidOut,
std.stdio.stdout, null, Config.newEnv);
if(wait(pid) == 0)
writefln("%s", pidOut.readln