home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / wizards / 3844 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  2.2 KB

  1. Xref: sparky comp.unix.wizards:3844 comp.unix.programmer:4572 comp.unix.internals:1776
  2. Newsgroups: comp.unix.wizards,comp.unix.programmer,comp.unix.internals
  3. Path: sparky!uunet!gumby!destroyer!ncar!noao!rstevens
  4. From: rstevens@noao.edu (W. Richard Stevens)
  5. Subject: Re: Implementation of Sys V. based message queues
  6. Message-ID: <1992Sep8.202405.24405@noao.edu>
  7. Sender: news@noao.edu
  8. Nntp-Posting-Host: gemini.tuc.noao.edu
  9. Organization: National Optical Astronomy Observatories, Tucson, AZ, USA
  10. References: <acourtny.715558246@unix1.tcd.ie> <1992Sep3.232807.18181@noao.edu> <1992Sep8.171014.21414@dickens.com>
  11. Date: Tue, 8 Sep 1992 20:24:05 GMT
  12. Lines: 37
  13.  
  14. >> [ complaints of mine about AIX's select that also selects on
  15. >>   messages queues ... ]
  16. >
  17. >Why? Is the implementation so awful?  I remember I almost barfed too but 
  18. >just because it was a new, strange select() that wasn't what I was used
  19. >to see.
  20. >
  21. >Anyway, I'm not trying to say that it's a great implementation, that
  22. >I don't know now, I just want to hear why it's bad.
  23. >
  24. >At least they did something ...
  25.  
  26. OK, here are my complaints.  First a disclaimer: I've never used AIX,
  27. I've just seen the man page for their select for the RS/6000.
  28.  
  29. They use the same name (select) for a function that's been used for
  30. 10+ years with different arguments.  Never use the same name for a
  31. different function, even if it does similar things.  They should have
  32. defined a new function (selectq ?) with new arguments to handle message
  33. queues.  They should have also kept the first 5 arguments to this new
  34. function identical to the existing select.
  35.  
  36. Next, they changed the first argument so that the high-order 16-bits
  37. are for one thing and the low-order for something else.  Yuck.  If you
  38. have to specify two counts (# of descriptors and # of message queues)
  39. then use 2 arguments!
  40.  
  41. Next, the middle three arguments aren't pointers to fd_set variables,
  42. they're pointers to an array of struct sellist.
  43.  
  44. My bottom line is that it appears that I would have to take every
  45. program using select that doesn't give a hoot about System V message
  46. queues and recode the selects to conform to this new interface.  Yuck.
  47. (Maybe they have some #defined constant that brings in the BSD-style
  48. select--I just don't know.)
  49.  
  50.     Rich Stevens  (rstevens@nooa.edu)
  51.