monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] [PATCH] New lua command execute_redirout which exec


From: Timothy Brownawell
Subject: Re: [Monotone-devel] [PATCH] New lua command execute_redirout which executes an os command and captures standard output
Date: Mon, 14 Aug 2006 14:56:31 -0500

On Mon, 2006-08-14 at 15:39 -0400, Daniel Dickinson wrote:
> Erm, but I think mkstemp returns a file handle  and spawn_redirected
> takes a filename which it opens (and truncates) or creates, so you
> can't simply feed the output of lua's mkstemp() into spawn_redirected
> unless lua file handles are just filenames.

It returns both. But looking at it, you probably actually want
temp_file() since mkstemp() needs a filename template as an argument,
while temp_file knows how to make one.
   local file, filename = temp_file() -- calls mkstemp($TMPDIR/mtn.XX)
   file:close() -- because we don't need it
   -- filename = $TMPDIR/mtn.XXXX
should work?

Tim
-- 
Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]