ACE_OS::write 的问题
以下内容为程序代码:#include <ace/OS_NS_stdio.h>
#include <ace/OS_NS_fcntl.h>
int main (int argc, char *argv[])
{
ACE_HANDLE fd= ACE_OS::open ("shaowei", O_CREAT | O_APPEND, 0644);
perror ("open");
ACE_OS::write (fd, "cui", 3);
perror ("write");
return 0;
}
执行后
# ./a.out
open: Success
write: Bad file descriptor
ACE_HANDLE fd= ACE_OS::open ("shaowei", O_CREAT | O_RDWR, 0644);
页:
[1]