Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!srhqla!denwa!icjapan!jimmy From: jimmy@denwa.info.com (Jim Gottlieb) Newsgroups: comp.unix.i386 Subject: Two Programming Questions Keywords: Shared Memory Locking -- TTY Read w/ Timeout Message-ID: <380@icjapan.uucp> Date: 27 Aug 90 09:35:07 GMT Sender: jimmy@icjapan.uucp Reply-To: jimmy@denwa.info.com (Jim Gottlieb) Organization: Info Connections, Tokyo, Japan Lines: 29 One of our programmers (who happens to be too lazy to get his UUCP link up and working) asked me to ask the following questions. We use Interactive 2.2. He is trying to open a tty port for a read and he wants the read to time out and complete after a certain time-out period has elapsed. He says that TFM explains how to do this but it does not work; it never times out. I suggested that he first try installing the FAS driver, but he does not want to give up VP/ix access to the serial ports. He also wonders if there is some way to write-lock shared memory. Our application requires that no more than one process be altering the contents of a certain shared memory segment. If not, I guess we can always kludge around the problem by using the presence of a "lock" file to indicate whether it is OK to write to that shared memory, or we can just forget about using shared memory and use a real file with file locking instead. If it is being constantly accessed, it will be in memory anyway. Any hints welcomed. Thanks... -- Jim Gottlieb Info Connections, Tokyo, Japan _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ or or Fax: +81 3 237 5867 Voice Mail: +81 3 222 8429