When built gcc-4.0 (20041010 snapshot), I discovered that GCC again uses vfork() instead of regular fork(). This is a "bad thing" due to following reasons:
- vfork() is deprecated -- it was a BSD kludge from old no-MMU-days (a politically-correct reason :-). - At least in Linux, vfork()s can't be followed by strace/ltrace, which makes debugging obscure situations MUCH harder. Of course, one can say "so -- build your own copy with vfork() disabled" (BTW -- how? There is no "--enable-vfork/--disable-vfork".). But even having an OPPORTUNITY for vfork() to be used is a danger -- someone else can supply you a vfork'ed GCC, which is undebuggable. For example, I've spent many hours trying to find out why some cross-compiler for PPC fails (it simply ignored the "-B" switch), while being able to strace it could give the clue in a minute. Interestingly, gcc-3.4.2, built in exactly the same way (../gcc-3.4.2/configure --prefix=/tmp/gcc-3.4 --enable-languages=c,c++) does "the right thing" -- it uses fork(). -- Summary: Please replace vfork() with fork() Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: enhancement Priority: P2 Component: driver AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: d dot yu dot bolkhovityanov at inp dot nsk dot su CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18006