multi_thread 프로그램에서 system() 함수 사용시 thread safe 한가요?
글쓴이: trymp / 작성시간: 화, 2014/03/11 - 10:27오전
환경은 linux fedra 6 환경이고요
multi_thread 프로그램에서 system() 을 이용해서 별도의 파일처리 작업을 하고 있습니다.
근대 이 system() 함수가 Mutlithread 상황에서 써도 안전한 함수인지 의문입니다.
아직까지 테스트시 문제는 발생하지 않았는데, 향후에라도 발생할수 있어서
이것에 대해 명확히 짚고 넘어갔으면 합니다.
잘 아시는 분 도움 좀 주세요.
Forums:


아니요. 절대 쓰시면 안됩니다.
아니요. 절대 쓰시면 안됩니다.
d
Using the system() function in more than one thread in a process or when the SIGCHLD signal is being manipulated by more than one thread in a process may produce unexpected results.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/system.html