Another reason why a few sources should come with binary licenses

Peter da Silva peter at graffiti.UUCP
Wed Sep 4 08:07:50 AEST 1985


> a device?) with some special rules (delete on last close, no name in
				      ^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^
> the visible file space except to root etc.) Of course any design should
  ^^^^^^^^^^^^^^^^^^^^^^
> be ignorable (transparently work the old way at sites that don't need it,
> like my UNIX/PC.)

easy, do this when you make temporary files:

	...make temp file name somehow (mktmp, maketmp, whatever it's
	   called this week)...
	if(!(fp = fopen(file, mode))) {
		...error processing...
	}
	unlink(file);

An unlinked file is not actually thrown away until the last close. Viola.
You get delete on last close & invisibility. Not that this is really important
since most everyone keeps their files open and thus deleting them (rm /tmp/*
was one problem suggested) wouldn't make much difference. For security just
make your tmp file 0600 mode.



More information about the Comp.unix.wizards mailing list