DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T l

⟦812947546⟧ TextFile

    Length: 528 (0x210)
    Types: TextFile
    Names: »lockwait.c«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec8/uutty/lockwait.c« 

TextFile

#include "uutty.h"
/*
** Wait on a lockfile.
*/
lockwait()
{	unsigned n;

	D5("lockwait()");
	if (lockfile[0] == 0) lockname();
	D4("lockwait:lockfile=\"%s\"",lockfile);
	n = 0;
	if (stat(lockfile,&status) >= 0) {
		D4("%s Lockfile \"%s\" exists.",getime(),lockfile);
		n = lockup();
		D4("%s Lockfile \"%s\" gone.",getime(),lockfile);
	}
	if (n) {				/* Port may be screwed up */
		opendev();			/* Close and reopen it */
		restdev();			/* Get it into proper state */
	}
	D4("lockwait:Returned after %d waits.",n);
	return n;
}