Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!newstop!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: Locking & forbiding Message-ID: <109202@sun.Eng.Sun.COM> Date: 9 Jun 89 18:45:51 GMT References: <7cBq029532iy01@amdahl.uts.amdahl.com> <108333@sun.Eng.Sun.COM> <108749@sun.Eng.Sun.COM> <1aY.02kv33t701@amdahl.uts.amdahl.com> Sender: news@sun.Eng.Sun.COM Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 30 In article <1aY.02kv33t701@amdahl.uts.amdahl.com> (Dave Lowrey) writes: >You assume wrong. The "shell" has opened the window, so I don't >own it. > >The program I am writing puts the Current Directory into the >title bar. It works now, without ANY locking, but I suspect that >I am inviting trouble by not preventing other processes from accessing >the data. You are correct, you are inviting trouble. Unfortunately there is no locking mechanisim possible to prevent the trouble you will get into because there is no way to tell the process that owns the window that it can't diddle with the window title. Many shells such as WShell do so, and you will crash them faster than a MiG in Paris. As for getting the screen, you realize you can get the window from the the console.device? Does your program run "under" this Shell? If so then your stdin should be a lock on the console device and you can query it to have it return you a pointer to it's window. That may be easier than querying ibase too. You might also want to check out a copy of Wshell and look at the title functions it supports, all in all they are pretty wizzy. Of course as the Shell it thinks it owns the titlebar :-) --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you. "A most excellent barbarian ... Genghis Kahn!"