lockf and the SVID, (Was "Re: Wanted: lockf system call source")

Spencer W. Thomas thomas at utah-gr.UUCP
Wed Dec 3 03:00:12 AEST 1986


Why would you require a file open for write to set a write lock?
Consider the following scenario:
	fd = open( "/etc/passwd", 0 );	/* this is ok */
	lock_for_write( fd );		/* Not so good, eh? */
	sleep( 1000000000 );		/* Now try to change your password */

-- 
=Spencer   ({ihnp4,decvax}!utah-cs!thomas, thomas at utah-cs.ARPA)



More information about the Comp.unix.wizards mailing list