home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / wizards / 3820 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.3 KB  |  41 lines

  1. Newsgroups: comp.unix.wizards
  2. Path: sparky!uunet!spool.mu.edu!sdd.hp.com!uakari.primate.wisc.edu!hp9000.csc.cuhk.hk!cucs5.cs.cuhk.hk!wmchung
  3. From: wmchung@eng.ie.cuhk.hk (chung wai man)
  4. Subject: Async IO problem
  5. Message-ID: <1992Sep5.113616.18458@cucs5.cs.cuhk.hk>
  6. Sender: news@cucs5.cs.cuhk.hk
  7. Organization: Faculty of Engineering, The Chinese U. of Hong Kong
  8. Date: Sat, 5 Sep 1992 11:36:16 GMT
  9. Lines: 30
  10.  
  11. Hi!
  12.  
  13. I have some problem about Async IO. In the Unix Network Programming
  14. by Stevens, on P.327, it has an example program telling how to make
  15. async IO. It has the codes:
  16.  
  17.     sigblock(sigmask((SIGIO));
  18.     while(sigflag == 0)
  19.       sigpause(0);eee(0)
  20.     
  21. I wonder if these codes are necessary for Async IO. These codes seems that
  22. the program will halt and wait for a signal. If it is so, it is just a
  23. blocking socket waiting for something to receive.
  24.  
  25. My concept for Async IO is that it is like a software interrupt. The 
  26. program can go along. When something has received, it will be interrupted
  27. , doing a routine already registered for signal SIGIO, then
  28. resuming.
  29.  
  30. I wonder if I am right. I hope that some experts can give comments to me.
  31. I am so perplexed on these issues. Moreover, I also want to know if the 
  32. select() system call is blocking or not.
  33.  
  34. Thanks!
  35.  
  36. I appreciate if you can email to me directly:
  37. wmchung@eng.ie.cuhk.hk
  38.  
  39. Best Regards,
  40. W.M. Chung
  41.