async file IO

New Message Reply Date view Thread view Subject view Author view

Desmond Hii Toh Onn (desmond++at++iss.nus.sg)
Tue, 2 Aug 1994 16:10:59 +0800 (SST)


Greetings, I'm having some problem with async file io.
I cannot write anything to it. There *must* be something
I did not do. Thanks for the advice in advance.

below is the code
desmond

/*________________________________________________________________*/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <Performer/pf.h>
#include <pr.h>

main()
{
  pfFile *oFile;
  int Fstatus;

  oFile = pfOpenFile("test.open",O_WRONLY|O_CREAT|O_APPEND,0644);

  Fstatus = pfWriteFile(oFile,"first line\n",11);
  printf("status of file %d\n",Fstatus);
  /* returns 0 !!! */

  Fstatus = pfGetFileStatus(oFile,PFRTF_STATUS);
  printf("status of file %d\n",Fstatus);
  /* return 1 */

  Fstatus = pfCloseFile(oFile);
  printf("status of file %d\n",Fstatus);
  /* return 0 */
}


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:26 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.