Talk:Review/std.process

From D Wiki
Revision as of 05:50, 18 December 2012 by Jniehus (talk | contribs) (Created page with "== Forum Discussion == * <b>alexrp</b>: Hi, I decided to take a stab at reviving the new std.process written by Lars T. Kyllingstad and Steven Schveighoffer. The result is [h...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Forum Discussion

  • alexrp: Hi, I decided to take a stab at reviving the new std.process written by Lars T. Kyllingstad and Steven Schveighoffer. The result is here. I decided to extract the work into new commits because rebasing the old branch in Lars's repo was way too cumbersome after so many months (and that branch also had a lot of merge commits). The code is obviously not written by me; all I did was a couple of build and test fixes.It currently works on 32-bit and 64-bit Linux. It would be great if someone could take it for a spin on OS X, FreeBSD, and Windows to see how it fares there (I'm particularly worried that I may have broken the Windows build). Lars or Steven, would either of you be willing to go through the review process with this module? I sent the druntime changes upstream a while back, so the Phobos changes are really all that remain in order to have it included.
    • Dejan Lekic: <thrilled>
    • Jacob Carlborg: On Mac OS X, move the declaration of "environ" out of the Environment class, it's used by two global functions. Also, running the unit tests for Phobos, I get this. I don't know if it has anything to do with the new std.process module or not. This is all for 32bit.
    • Jakob Bornecrantz: L417. You need to call toArgz and toStringz before the fork, since either of those can be in TLS. Test with:
string cmd = "echo";
string[] args1 = ["hello"];
string[] args2 = [];

void main()
{
  spawnProcess(cmd, args2);
  spawnProcess(cmd, args1);
  args ~= "World";
  spawnProcess(cmd, args2);
}
I'm not exactly sure what is up, but in one of my projects I had this problem. I solved it by just making all the string[]s into __gshared.
  • Andrej Mitrovic: std/c/stdio.d is missing _fdToHandle, see steven's repo and just copy the file over to the new one.
  • Lars and Steven: busy but yearning to come back...