From osoong+r at gmail.com  Thu Feb 24 00:21:45 2011
From: osoong+r at gmail.com (Oliver Soong)
Date: Wed, 23 Feb 2011 15:21:45 -0800
Subject: [Rd] system(wait = FALSE)
Message-ID: <AANLkTin7u18yiwLo9yiO0v97n=FJHOsFXUuOrzKH0Hqj@mail.gmail.com>

I'm having a very odd problem with system(wait = FALSE).  I'm not
entirely sure whether it's a bug in R or a problem on our end.  It's
related to a post a month or so ago in R-help which got no responses,
but I have a little more to add.

This command works as expected (I use c:\tmp since c:\ isn't normally
writable under later versions of Windows).  The file is created at
c:\tmp\tmp.txt.
system("cmd /c dir > c:\\tmp\\tmp.txt", wait = TRUE)
This command does not work as expected.  There is no file created at
c:\tmp\tmp.txt.
system("cmd /c dir > c:\\tmp\\tmp.txt", wait = FALSE)

The computer is a 64-bit Windows Server 2008R2 machine.  This affects
R 2.12.1, both the 32-bit and 64-bit RGui executables but not the
RTerm executables.  This does not affect 32-bit Windows XP, 32-bit
Windows Server 2003, or 64-bit Windows Server 2008.  This does not
affect R 2.12.0, and if I'm reading the svn logs correctly, there were
some changes made to the system function from 2.12.0 to 2.12.1.
Things seem to work normally when R is started from the start menu
recent programs list, but things do not work properly when R is
started from a shortcut, from the start menu all programs menu, or
through explorer.

I'm stumped.  Any ideas I can try?

Oliver



[Rd] system(wait = FALSE)
Oliver Soong