Although the socket interface is compatible with VxWorks, the environment does affect how you use sockets. Specifically, the globally accessible file descriptors available in the task-independent address space of VxWorks require that you take extra precautions when closing a file descriptor.
You must make sure that one task does not close the file descriptor on which another task is pending during an accept( ). Although the accept( ) on the closed file descriptor sometimes returns with an error, the accept( ) can also fail to return at all. Thus, if you need to be able to close a socket connection's file descriptor asynchronously, you may need to set up a semaphore-based locking mechanism that prevents the close while an accept( ) is pending on the file descriptor.
>> TCP 소켓과 파일 디스크립터가 공유된다는 언급. 따라서 주의해서 사용해야 할 것을 말함.
TCP 소켓과 파일 IO가 RT 연결끊김에 연관관계가 있음을 의미
댓글 없음:
댓글 쓰기