home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / aix / 8954 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.7 KB

  1. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!mips!swrinde!cs.utexas.edu!torn!watserv2.uwaterloo.ca!watserv1!hesse
  2. From: hesse@watserv1.uwaterloo.ca (BJ Cameron - DCS)
  3. Newsgroups: comp.unix.aix
  4. Subject: My backend is out of control (and it's not a pretty sight).
  5. Message-ID: <BtADCK.IzF@watserv1.uwaterloo.ca>
  6. Date: 20 Aug 92 14:24:19 GMT
  7. Organization: University of Waterloo
  8. Lines: 28
  9.  
  10.  
  11.    I am attempting to replace the standard backend program PIOBE with my own
  12. homebrew code.  For the most part, it works as designed; however, it seems
  13. to have a bit of a problem detecting that the device it is talking to has
  14. gone away.  By "gone away" I mean telling that the device (in this case
  15. a printer) has been turned off or that the cable has been torn off, breaking
  16. the connection between the RS6000 and the printer.  The method I use to
  17. test this "loss of printer" is to tear the cable from the RS6000 side, that way
  18. not being fooled by some wierd cable design.  Anyway, when I use PIOBE as
  19. the backend the removal of the cable is detected and the queue goes down; when
  20. I use my backend program the removal is not detected causing data to continue
  21. to be sent to the serial port.
  22.  
  23.    Now, I have a feeling that my code should be detecting this change of state
  24. but I'm not real sure how this is done.
  25. Some questions:
  26.  
  27. 1.  Is there a way (maybe an ioctl call) that will tell me if the DTR or DCD
  28. signals have gone away?
  29.  
  30. 2.  Is in fact the qdaemon or the device driver telling my program that the
  31. device has gone away, but my program doesn't understand?  if so, which one?
  32.  
  33. 3.  Is there a sample of a backend program that shows how this is detected?
  34.  
  35. 4.  Better yet, is the source for PIOBE available?
  36.  
  37. Thanks... Bri
  38.