ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pdk
pdk
RE: Improving the perlapp --tmpdir mechanism
by Jan Dubois other posts by this author
May 14 2009 10:23AM messages near this date
RE: Improving the perlapp --tmpdir mechanism | Re: Improving the perlapp --tmpdir mechanism
On Thu, 14 May 2009, kenneth@[...].se wrote:
>  Instead I *have* implemented the idea of a cron job that monitors and
>  cleans, except it must be much, much more aggressive than your
>  example. Depending on the server, it cleans everything older than a
>  few days at most, and in some cases mere hours. Actually, there are
>  other factors at play also (it is dependent on a threshold, regardless
>  of age, it doesn't measure just individual files as leafs but
>  calculates based on trees etc etc etc).

Ok, I understand, the /tmp partition is essentially too small.

>  So, trying to come to the point: if I could set my app to use, say
>  '/<something_else_than_tmp>/my_fancy_app' as the 'root' for PDK tmp
>  files, they simply wouldn't encroach on /tmp and even if I still
>  used /tmp with something like '/tmp/my_fancy_app' I could easily
>  adjust aggressiveness for that subtree only, and have other rules
>  for other trees.

This is already possible with --tmpdir, so I assume what you are
asking for is that PerlApp should try to create this directory
if it doesn't already exist.  Would that already solve the problem?

Note that you can be as flexible as you want if you distribute your
app as 2 files: the actual PerlApp'ed executable and a simple wrapper
script or batchfile to run it (untested, just typed into email client):

myapp.bat:
--------------------------------------
@echo off
setlocal
set TMP=%HOME%\.myapp
if not exist %TMP% mkdir %TMP%
runmyapp.exe
--------------------------------------

myapp.sh
--------------------------------------
TMPDIR=~/.myapp
mkdir $TMPDIR
TMPDIR=$TMPDIR myapp.exe
--------------------------------------

That way you can go completely wild in how you want to define the
optimal /tmp location dynamically, and your end users can also
override things if your scheme still doesn't apply for a particular
box.

Cheers,
-Jan

_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
kenneth
David Kaufman
Jan Dubois
kenneth
Jan Dubois
kenneth
Jan Dubois
kenneth
Terris Linenbach

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved