Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.sys.3b1 FAQ part2
Section - 7.4. Why does rn fail with "Can't open /dev/tty" from the built-in modem?

( Part1 - Part2 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Cities ]


Top Document: comp.sys.3b1 FAQ part2
Previous Document: 7.3. What can I do when I get lots of FDERRs when writing/formatting a floppy?
Next Document: 7.5. Can I connect my Starlan board to an Ethernet?
See reader questions & answers on this topic! - Help others by sharing your knowledge

	The problem is a line in the term.c file.  The lines that have
to be changed for rn to work are:

	Before change:

		[...]
    		devtty = open("/dev/tty",O_RDONLY);
    		if (devtty < 0) {
			printf(cantopen,"/dev/tty") FLUSH;
			finalize(1);
    		}
    		fcntl(devtty,F_SETFL,O_NDELAY);
		[...]

	After change:

		[...]
    		devtty = open("/dev/tty",O_RDWR);    /* changed for UNIX PC */
    		if (devtty < 0) {
			printf(cantopen,"/dev/tty") FLUSH;
			finalize(1);
    		}
    		/* fcntl(devtty,F_SETFL,O_NDELAY);   /* changed for UNIX PC */
		[...]

	This change is required because the /dev/ph* devices require
DATA connections to be opened with O_RDWR, so changing the O_RDONLY
(or, in some versions of rn, the constant 0) to O_RDWR will solve your
problems.  Note that these changes are also required for rn-derived
programs like trn.

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

CAPTCHA




Top Document: comp.sys.3b1 FAQ part2
Previous Document: 7.3. What can I do when I get lots of FDERRs when writing/formatting a floppy?
Next Document: 7.5. Can I connect my Starlan board to an Ethernet?

Part1 - Part2 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
jbunch@nyx.nyx.net (John B. Bunch)





Last Update March 27 2014 @ 02:11 PM