Re: [Tracker] Bad use of /tmp



Laurent Aguerreche wrote:
Le samedi 04 novembre 2006 Ã 16:50 +0100, Ulrik Mikaelsson a Ãcrit :
I would say this is obviously a great idea, and much needed, but I
would just like to ask, WHY "a random integer" for num, instead of the
process id?

Well, Devhelp and other programs use similar things so I did the same...

I might be missing something, but using process id is both guaranteed
to be unique to each session, and a known solution to the
requirement.

It is unique when you keep the same trackerd all over session but it
would be very rare to see trackerd get one of its old pid after it
exited or crashed.


Still, good idea, and the patch looks clean while just scanning it.
Though I might recommend looking over the first line of
sanity_check_option_values() in src/trackerd/trackerd.c. The point of
the patch seems overall to get rid of g_get_tmp_dir(). :)

I use g_get_tmp_dir() and try to make a temporary directory into it.

But I send a new patch a little bit cleaner.


thanks I have changed it to use pid instead of a random number

(we delete an existing one if there)


applied to cvs

--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/




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