[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS (take 2): libbash



In <[🔎] cfb54190905121411u71ae6971r499e87a0895b87f2@mail.gmail.com>, Hai Zaar 
wrote:
>I need separate 1777 directory for locks library of libbash, since it
>may create rather complex file structure there, so I do not want to
>put it to just /tmp or /var/tmp/, since it may lead to collisions with
>files created manually by users

That's a *desire*, not a *need*.

Follow the lead set by GPG, KDE, ORBit, PulsaAudio, SCIM, and SSH.[1]  Put 
files in /tmp and if you need a "complex directory structure", create a per-
user (or "instance") directory in /tmp and place your files inside.

mkdtemp is your friend here, although it is not completely portable.  
mktemp+mkdir are portable, but make sure your code does not have a race 
condition.

So far you haven't provided any evidence that /tmp or /var/tmp are 
inappropriate for your program.
-- 
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

[1] Taken together, it is a good crowd to be in.

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: