This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Fixing the PROCESS_DUP_HANDLE security hole.

I tried my spawn(P_DETACH) example (updated since yesterday)
with the latest snapshot, this time on NT. 

#include <stdio.h>
#include <unistd.h>
#include <process.h>

    spawnl(_P_DETACH, "/c/WINNT/system32/notepad", "notepad", 0);
    printf("Spawn done\n");
    /* Keep working */

New problem is with gcc (gcc version 3.3.3 (cygwin special))
~/try> uname -a
CYGWIN_NT-4.0 usched40576 1.5.12(0.116/4/2) 2004-11-10 08:34 i686 unknown unknown Cygwin
~/try> gcc -o try_spawn try_spawn.c

~/try> uname -a
CYGWIN_NT-4.0 usched40576 1.5.13s(0.117/4/2) 20041221 16:19:37 i686 unknown unknown Cygwin
~/try> gcc -o xxx try_spawn.c
In file included from /usr/include/stdio.h:45,
                 from try_spawn.c:1:
/usr/include/sys/reent.h:810: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.

When running try_spawn with the snapshot, during the sleep period
ps reports  

      690     443     690        232    0 11054 10:32:21 <defunct>
      464     690     690        464    0 11054 10:32:21 /c/WINNT/system32/notepad

Similarly when running try_spawn in the background,
bash reports "Done" before the job has terminated:
~/try> ./try_spawn.exe &
[1] 740
~/try> Spawn done

[1]+  Done                    ./try_spawn.exe
~/try> Exiting

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]