Closed GoogleCodeExporter closed 9 years ago
Hi, I was the one posting on this issue on your blog.
I managed to get a crash when I compile popen_noshell.c in c++ (just a few
malloc conversions are needed).
See attached files for details, and
"g++ mytest.cpp popen_noshell.cpp -o mytest && ./mytest"
should lead to a segfault.
Note that if you compile popen_noshell.c as a pure C library and link it with
mytests.cpp, there is no problem. Obviously there is no such thing as "call
global object's destructors" in the C version of exit().
Original comment by devoud....@gmail.com
on 13 Mar 2011 at 9:07
Attachments:
[deleted comment]
Thank you for the attached examples. I've fixed the exit() vs. _exit() issue.
It turned out that err() and errx() are using exit() too, so they needed to be
wrapped.
Reference: Committed revision 5.
Original comment by ivan.zah...@gmail.com
on 18 Mar 2011 at 9:40
Original issue reported on code.google.com by
ivan.zah...@gmail.com
on 12 Mar 2011 at 11:38