Re: exec*() bug

2010-04-27 Thread Christopher Faylor
On Tue, Apr 27, 2010 at 02:44:14PM -0600, Eric Blake wrote: >On Linux, 'env ./.' triggers an exec() that fails with EACCES, and exits >with status 126 (file was located, but cannot be executed). But on >Cygwin, the exec() fails with ENOENT, and env exits with status 127 >(file could not be located

exec*() bug

2010-04-27 Thread Eric Blake
On Linux, 'env ./.' triggers an exec() that fails with EACCES, and exits with status 126 (file was located, but cannot be executed). But on Cygwin, the exec() fails with ENOENT, and env exits with status 127 (file could not be located). This is particularly insidious, because some programs depend

Re: Strange fork/exec bug, two processes instead of one are created

2006-10-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Papasha on 10/23/2006 2:57 AM: > > I use it to launch a program compiled using MSVC++ 2005: > > It starts, everything is ok, but in windows TaskMan I see something like > this: > spawner.exe > spawner.exe > testproj.exe To be expected.

Strange fork/exec bug, two processes instead of one are created

2006-10-23 Thread Papasha
Hello, everyone, I have a problem using fork/exec, I have a program that launches other program: //spawner.exe #include #include int main(int argc, char* argv[]) { pid_t pid = 0; if (argc < 2) { fprintf(stderr, "Usage: spawner executable [arguments]\n"); return -1; } pid = fork(); if (pid =