home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.wizards
- Path: sparky!uunet!usc!cs.utexas.edu!torn!cunews!nrcnet0!netfs!manitou.cse.dnd.ca!pburry
- From: pburry@manitou.cse.dnd.ca (Paul Burry)
- Subject: Re: ptys and other pipe-like devices
- Message-ID: <1992Jul31.025433.18527@manitou.cse.dnd.ca>
- Organization: Canadian System Security Centre
- References: <1992Jul24.014111.3578@manitou.cse.dnd.ca> <1992Jul29.192000.4885@prl.dec.com>
- Date: Fri, 31 Jul 92 02:54:33 GMT
- Lines: 53
-
- In article <1992Jul29.192000.4885@prl.dec.com> boyd@prl.dec.com (Boyd Roberts) writes:
- |In article <1992Jul24.014111.3578@manitou.cse.dnd.ca>, pburry@manitou.cse.dnd.ca (Paul Burry) writes:
- |> I have an application that would like to make 16k non-interruptable writes
- |> to a pty device.
- |
- |16k write down a pty. Yeah, right, what _are_ you trying to do?
- |
- |What about signal(2)?
- |
- |
- | oldsig = signal(SIG-to-be-avoided, SIG_IGN);
- |
- | write(...);
- |
- | signal(SIG-to-be-avoided, oldsig);
- ...
-
- What I am trying to do is configure a commercial database so it will
- write its database backups to a process. The database is Sybase 4.8
- and it unfortunately will only accept disk-like or tape-like devices.
- It will refuse to use a named-pipe. I do not have the source to this
- product so I cannot fix this problem.
-
- I have found that it will accept a pty device. My process will service
- the master-side of the device. This does indeed work BUT it seems that
- Sybase's writes to the pty are occassionaly interrupted by a SIGIO or
- a SIGALRM. When it sees that it was unable to write its entire buffer,
- it considers the device to have failed. [Sybase likely uses these
- signals for scheduling IO or user space threads.]
-
- I must somehow configure the pty to behave the same as a disk
- or tape device. That is, reads or writes must not be interrupted by signals.
- I was hoping that if I could not change the priority used by the driver, that
- maybe by changing the size of the internal buffer used I could achieve the
- same effect.
-
- Alternatively, I could use another type of named device that supports
- non-interruptable (by signals) reads and writes and supports a
- master and client side.
-
- Has anyone written a device drive like this?
- Could you send me the source?
-
-
- /Paul
-
- PS. I am using SunOS 4.1.[12].
-
- --
- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- Paul Burry
- Voice: (613)-991-7325 Internet: pburry@cse.dnd.ca
- Fax: (613)-991-7323 UUCP: ..!{uunet,cunews}!cse.dnd.ca!pburry
-