home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / wizards / 3366 < prev    next >
Encoding:
Text File  |  1992-07-30  |  2.4 KB  |  64 lines

  1. Newsgroups: comp.unix.wizards
  2. Path: sparky!uunet!usc!cs.utexas.edu!torn!cunews!nrcnet0!netfs!manitou.cse.dnd.ca!pburry
  3. From: pburry@manitou.cse.dnd.ca (Paul Burry)
  4. Subject: Re: ptys and other pipe-like devices
  5. Message-ID: <1992Jul31.025433.18527@manitou.cse.dnd.ca>
  6. Organization: Canadian System Security Centre
  7. References: <1992Jul24.014111.3578@manitou.cse.dnd.ca> <1992Jul29.192000.4885@prl.dec.com>
  8. Date: Fri, 31 Jul 92 02:54:33 GMT
  9. Lines: 53
  10.  
  11. In article <1992Jul29.192000.4885@prl.dec.com> boyd@prl.dec.com (Boyd Roberts) writes:
  12. |In article <1992Jul24.014111.3578@manitou.cse.dnd.ca>, pburry@manitou.cse.dnd.ca (Paul Burry) writes:
  13. |> I have an application that would like to make 16k non-interruptable writes
  14. |> to a pty device.
  15. |
  16. |16k write down a pty.  Yeah, right, what _are_ you trying to do?
  17. |
  18. |What about signal(2)?
  19. |
  20. |
  21. |    oldsig = signal(SIG-to-be-avoided, SIG_IGN);
  22. |
  23. |    write(...);
  24. |
  25. |    signal(SIG-to-be-avoided, oldsig);
  26. ...
  27.  
  28. What I am trying to do is configure a commercial database so it will 
  29. write its database backups to a process.  The database is Sybase 4.8 
  30. and it unfortunately will only accept disk-like or tape-like devices.  
  31. It will refuse to use a named-pipe.  I do not have the source to this 
  32. product so I cannot fix this problem.
  33.  
  34. I have found that it will accept a pty device.  My process will service 
  35. the master-side of the device.   This does indeed work BUT it seems that
  36. Sybase's writes to the pty are occassionaly interrupted by a SIGIO or 
  37. a SIGALRM.  When it sees that it was unable to write its entire buffer,
  38. it considers the device to have failed.  [Sybase likely uses these 
  39. signals for scheduling IO or user space threads.]
  40.  
  41. I must somehow configure the pty to behave the same as a disk
  42. or tape device.  That is, reads or writes must not be interrupted by signals.
  43. I was hoping that if I could not change the priority used by the driver, that
  44. maybe by changing the size of the internal buffer used I could achieve the
  45. same effect.
  46.  
  47. Alternatively, I could use another type of named device that supports 
  48. non-interruptable (by signals) reads and writes and supports a 
  49. master and client side.
  50.  
  51. Has anyone written a device drive like this?  
  52. Could you send me the source?
  53.  
  54.  
  55. /Paul
  56.  
  57. PS.    I am using SunOS 4.1.[12].
  58.     
  59. -- 
  60. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  61. Paul Burry            
  62. Voice: (613)-991-7325        Internet: pburry@cse.dnd.ca
  63. Fax:   (613)-991-7323        UUCP:      ..!{uunet,cunews}!cse.dnd.ca!pburry
  64.