-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 17/12/14 08:32, Mike Edenfield wrote:
>>>> "A general use scratch pad area where files written are not
>>>> expected to survive successive invocations of the program
>>>> that wrote them". That's interesting as it means the sysadmin
>>>> can delete everything in /tmp at any time for any reason,
>> 
>> And as long as the app doesn't close the file descriptor,
>> everything will continue to work just fine. I used to do this for
>> fun about once a week or so on a many multiuser host, then tell
>> users to tell upstream to fix the stupid bugs in any apps that
>> broke. I've calmed down since then, must have something to do
>> with the onset of senility...
> 
> Then I discovered that ssh-agent decided that a good default place
> to put its domain socket was /tmp/ssh-XXXXXXXXXXXXXXXXXX and
> deleting it breaks ssh key forwarding, among other things :\

I think a key point has been missed here, and that is use of the words
"successive invocation".

To me, /tmp is an area where files that are /not meant to be
permanent/ are able to be written without contaminating the file
system and without requiring open permissions in other more sensitive
areas like /usr/share or /etc/randomdir.

A single invocation of a program having its /tmp contents removed and
then acting abnormally isn't something that I would consider a bug.
It's when a _subsequent_ run fails because it's expecting a file that
is, at least by it's location, _temporary_.

One analogy may be that in driving a car, you expect that the engine
is running, but it is only required whilst the car is being driven
(therefore temporary - only required for that specific invocation). If
you suddenly stop the engine when you're halfway to where you're
going, within that invocation, you're going to have a bad time.

If a program is expecting a dynamically generated file that isn't in
the "normal" file system hierarchy, then that file should probably be
stored in somewhere like /var or /usr, rather than /tmp.

Well, that's my loose change worth. Also, it's early for me - please
excuse any bad analogies. :-)

- -- 
wraeth <wra...@wraeth.id.au>
GnuPG Key: B2D9F759
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iF4EAREIAAYFAlSQr1YACgkQXcRKerLZ91kh2AD9HrxjihW5NqY673Af+GRCq6Bj
kKsyiBUMJAVTkz96fJoA/2P6y3U5drh5Yma5uFRfK+l1YOdrsKj5LPVHBIa7Egpx
=HmpB
-----END PGP SIGNATURE-----

Reply via email to