Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ccivax.UUCP Path: utzoo!watmath!clyde!cbosgd!cbdkc1!desoto!packard!hoxna!houxm!mhuxj!mhuxr!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!rochester!ritcv!ccivax!crp From: crp@ccivax.UUCP (Chuck Privitera) Newsgroups: net.bugs.uucp,net.unix-wizards Subject: What is the definitive HUP protocol (for uucp)? Message-ID: <236@ccivax.UUCP> Date: Tue, 26-Feb-85 09:33:04 EST Article-I.D.: ccivax.236 Posted: Tue Feb 26 09:33:04 1985 Date-Received: Fri, 1-Mar-85 06:20:54 EST Distribution: net Organization: CCI Telephony Systems Group, Rochester NY Lines: 58 Xref: watmath net.bugs.uucp:473 net.unix-wizards:12189 I've seen many variations on the HUP protocol for UUCP. e.g. : System V[r2], 4.2BSD, 2.9BSD, others? : ... case HUP: ... if (msg[1] == 'Y') { WMESG(HUP, YES); turn off protocol return; } In a bug report long ago (pre-4.2BSD): ... if (msg[1] == 'Y') { WMESG(HUP, YES); /* * If you look at this code carefully, you'll see that * any site, either master or slave, which receives an * HY always acknowledges with an HY. Therefore, the * actual protocol is: * * MASTER: send H ("I've got no work, how about you?") * SLAVE: send HY ("I'm ready to hang up, how about you?") * MASTER: send HY ("I'm ready to hang up, let's hang up.") * SLAVE: send HY (this is the one that "isn't supposed * to be there") and turn off protocol. * * So the master should wait for the slave's HY before * turning the protocol off on its side. * What should REALLY happen is that only a MASTER * should send out the HY, but changing that here would * not solve the problem of talking to a side which * hasn't fixed this. * It looks like both people doing the turnoff is OK, * in that it will result in an exchange of close * messages and each machine will shut down when the * it gets the CLOSE message from the other machine. */ if (role == MASTER) RMESG(HUP, msg, 1); And finally, the implemenation suggested to be correct in the above comment, i.e. : if (msg[1] == 'Y') { if (role == MASTER) WMESG(HUP, YES); turn off protocol; return; } So which is correct? I'm getting too many: uucp system (2/25-11:09-3289) BAD READ (expected 'H' got FAIL) Thanks in advance for any help on this,