This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: using spawn functions to avoid fork() errors -- FIXED
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Steven Bardwell <sbardwell at lbmsys dot com>, cygwin at cygwin dot com
- Date: Fri, 7 Feb 2014 19:23:11 +0400
- Subject: Re: using spawn functions to avoid fork() errors -- FIXED
- Authentication-results: sourceware.org; auth=none
- References: <029e01cf2409$2cbc7e90$86357bb0$ at lbmsys dot com>
- Reply-to: Andrey Repin <cygwin at cygwin dot com>
Greetings, Steven Bardwell!
> I found the problem that was causing the failure of child creation logic
> on the 64-bit install but not on the 32-bit version:
> in an effort to make the output from 'ps' more useful, my application was
> over-writing the contents of argv[1] in the main process. This trick works
> fine in many flavors of Unix (including Interix and Linux and 32-bit
> Cygwin).
CYGWIN=wincmdln
?
> However, in Cygwin 64-bit, it somehow corrupts things such that the
> child process created by fork() or spawnv() failed to load correctly. After
> removing that 'feature,' both spawnv() as well as the original fork() logic
> work without any problem.
Could still be NULL termination problem. If the strings you manipulating are
in UTF16, you need TWO \0 to terminate the string.
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 07.02.2014, <19:21>
Sorry for my terrible english...
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple