Still attempting to test this but a compiler warning showed me that lstrlen= W is being used on a char*. That is probably the problem. From: James French [mailto:James.French / naturalmotion.com] Sent: 14 September 2011 11:39 To: ruby-core / ruby-lang.org Subject: [ruby-core:39547] Potential bug in rb_w32_spawn? Hi group, Since upgrading from 1.9.2-p180 to 1.9.2-p290 I've been seeing sporadic and= non-reproducible E2BIG errors coming from spawn. Looking in win32.c, http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/tags/v1_9_2= _290/win32/win32.c?r1=3D31798&r2=3D31811 is the reason. Since the issue is = very sporadic (and sometimes fails on commands with no command line argumen= ts), I suspect that the command string might not be null terminated. Before= I found out about this code I wrote a number of unit tests which tested lo= ng argument lists and large environments and it didn't show anything up. The cmd string is built in rb_w32_spawn so I suspect there might be a probl= em there. I will try and dig further if I get the time. Cheers, James