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

Bug#311424: checking for write18



On Tue, Jan 17, 2006 at 17:02 +0000, Richard Lewis wrote:
> Frank Küster <frank@debian.org> writes:
> 
> > Does anybody on the list know how to check whether \write18 is enabled
> > in a TeX document?
> 
> This page
> <http://groups.google.co.uk/group/comp.text.tex/browse_thread/thread/c843abf7f2f476b7/361e72f2028b7798?lnk=st&q=test+%5Cwrite18+enabled&rnum=2#361e72f2028b7798>

Ah, there was this discussion.
 
> gives one possibility:
> 
> \def\tmpfile{/tmp/w18-test-\the\year\the\month\the\day\the\time}
> \immediate\write18{touch \tmpfile}
> \IfFileExists{\tmpfile}{\message{YES}}{\message{NO}} 
> 
> but one should really check \tmpfile didnt exist before the 'touch',
> and maybe get rid of \tmpfile afterwards (which has possible security
> risks i suppose).

Indeed, it's an unsave way to create a temporary file. An it has /tmp
hardcoded in it. I am quite sure that Heiko won't add something like
this to epstopdf.sty.

cheerio
ralf



Reply to: