site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=k34cH7Ncq+jtM8fzPmxM2PpssSWWL9cUPMb/UmnRQjv1QrC9G3t1zWzRG3uVTUZnzZyqo52ZWbSnuG4LZT9WNisrmnxFa0yCb+jY9oaIEjzuByjUanmq4KxPnAR3LAVcHT/y1+TvuGeSeJ4peYQDqakj1o7MnT2PUry4Fy3x9CE= Thanks. That's something, but not quite what I'd hoped for. Is there a way that I could tell when another program has opened the "call-out device", and more importantly, when it has closed it, so that I can put the modem back into a known state? -- Dan On Fri, 11 Feb 2005 12:23:24 -0800, Mike Smith <msmith@freebsd.org> wrote:
I couldn't find any documentation or discussion of serial port arbitration in darwin or Mac OS X. The situation is the classic one: I want my program to listen on the modem port but yield it to any other program wishing to use it. The efax man page mentions the "UUCP device locking protocol", but this appears to be useful only if all other applications adhere to it. Is Open Transport's arbitration mechanism supported under Mac OS X? If so, what does it use on the darwin level?
I also wouldn't want the fact that I'm listening on the device to interfere with sleep. Do I need to listen for system power notifications and close the port when the system is requesting permission to go to sleep?
As with all BSDs, you should open the call-in device (/dev/tty*).
Programs that want to use the line to call out will open the call-out device (/dev/cu*)
Typically, this means you open /dev/tty.modem, and others will open /dev/cu.modem.
Having the call-in device open should not prevent the system from sleeping.
= Mike
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com