jimmy@gryphon.CTS.COM (Jim Gottlieb) (01/25/88)
I recently installed HoneyDanBer UUCP, and wonder why I put it off so long. The only problem is that HDB deals with lock files differently, and if I am using kermit or async_main when uucp decides it wants to use the phone, I'm out of luck. uucp just grabs without asking. Perhaps something could be done in uudemon.hour to modify the lock files before uusched is called (though this wouldn't help if someone issued a uucp command and didn't tell it to queue). Any suggestions? I tried a few things, but the debug file for uucp keeps showing, "ok to remove lock file," as I shout, "No! Don't!" Next, does anyone have any experience with the general ledger program that AT&T sells for the UNIX PC, or any pointers to another (and maybe less expensive?) program. Most of the generic UNIX GL programs I have looked at require a COBOL compiler, and that goes against my morals. Lastly (I save up questions for postings), was anyone able to get gnuemacs compiled as a demand-paged executable? Brant posted some mod's (back in October) to the m-7300.h file to make this happen, but they caused a "Memory Fault--Core Dumped." Anything more recent I don't know about? Thanks all... Jim (Gottlieb) <<>> "Most of us become children again when we enter the slums of Asia." --from "The Year Of Living Dangerously" How do thee reach me? Let me count the ways: 1: From the DDN (ARPA) -- ucla-an!denwa!jimmy@ee.ucla.edu or jimmy@pic.ucla.edu 2: From UUCP land -- {rutgers, ucbvax}!ucla-cs!ucla-an!denwa!jimmy 3: Another UUCP route -- sdcsvax!crash!gryphon!denwa!jimmy 4: On MCI Mail -- 304-9271 5: On the phone, live -- Domestic (213) 824-5454, Int'l +1 213 824 5454 6: On the phone, voice mail -- (213) 281-5581, +1 213 281 5581
rjd@occrsh.ATT.COM (01/27/88)
>I recently installed HoneyDanBer UUCP, and wonder why I put it off so >long. The only problem is that HDB deals with lock files differently, >and if I am using kermit or async_main when uucp decides it wants to >use the phone, I'm out of luck. uucp just grabs without asking. >Perhaps something could be done in uudemon.hour to modify the lock >files before uusched is called (though this wouldn't help if someone >issued a uucp command and didn't tell it to queue). Any suggestions? >I tried a few things, but the debug file for uucp keeps showing, "ok >to remove lock file," as I shout, "No! Don't!" Leave the uucp commands alone..... You just need to create a file by the name LCK..</dev entry> containing the process ID number of the active process that is using the port. Uucp checks for this LCK.. file *AND* checks to see if the process number contained in the file is still active before opening the port. If the process number in the file is not active or there is no process number in the file (but nobody would do that, would they? :-) ), it *IS* "ok to remove the lck file". I wrote a shell script to handle the generation of the lock files which might explain it better. This shell script works both ways: it will not let your process use the port if uucp is using it, and if uucp is not using it, it will generate the proper lock file so uucp will not "grab" it in the middle of your session. Be aware that the lock files are NOT removed religiously once the using process terminates. This is not a bad thing, as you should always check for the existance of the process before assuming that the port is actually in use, as the existance of the lock file is not the final word. Here is the pertainent fragment: -------------------------------------------------------------------------------- # "DK" is the device name I am needing to use, you will need to change it below # to the desired device name in your Devices file. - RJD #EXEC=<program name> #NUM=<set to number of tries this program has found all devices unavailable> BAD=YES for PORT in `/bin/grep '^DK ' /usr/lib/uucp/Devices | /usr/bin/cut -c4-9` do LCKFILE=/usr/spool/locks/LCK..$PORT if [ -s $LCKFILE ] then /bin/ps -p `/bin/cat $LCKFILE` > /dev/null if [ $? -eq 1 ] then BAD=NO break fi else BAD=NO break fi done if [ "$BAD" = "NO" ] then /bin/echo $$ > $LCKFILE /bin/chgrp uucp $LCKFILE /bin/chmod 444 $LCKFILE /bin/chown uucp $LCKFILE $EXEC -l/dev/$PORT -s # Execute the program that uses the port if [ $? -ne 0 ] then BAD=YES fi /bin/rm -f $LCKFILE else /bin/echo "${0}: no devices available, count $NUM" fi -------------------------------------------------------------------------------- Randy Davis UUCP: ...(ihnp4!)3b2fst!randy 3B2 System Test Engineering ...(ihnp4!)occrsh!rjd AT&T Network Systems, Oklahoma City Works All opinions and/or advice stated above are MY OWN, not those of AT&T.