2bc Subj : Re: Problem with system() calls in a multithreaded program on HPUX 11 To : comp.programming.threads,comp.sys.hp.hpux From : otto Date : Thu Feb 17 2005 12:31 am In article <4211a1e8@news.meer.net>, "Dan Koren" writes: > > Replace 'system(cmd)' by 'pclose(popen(cmd, "w"))' and > things should work as long as 'cmd' is reasonably well > behaved. Note that this will crash if popen() fails, since passing in NULL to pclose() will cause a segfault. I see this is used as a suggestion in the popen man page on Solaris (in fact both examples they give are buggy), they should really fix this so that naive users don't write broken programs. Otto . 0