monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: bug report ver 0.16, on windows


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Re: bug report ver 0.16, on windows
Date: Tue, 22 Feb 2005 15:24:39 -0800
User-agent: Mutt/1.5.6+20040907i

On Tue, Feb 22, 2005 at 08:49:34PM +0100, Jon Bright wrote:
> My basic idea would be to implement using CreateProcess() on Windows, 
> and just call down to fork/exec on Unix-like systems.  I don't *think* 
> calling CreateProcess() is abusable (other than maybe by getting a 
> trojan before the intended .exe in the PATH, but if the attacker can do 
> this, you've got bigger problems).

Yeah.  Basically what we really need is just some function that takes
a command name and a list of arguments, and runs that command with
those arguments in a blocking fashion.  At the moment we do this by
exposing fork/exec/wait to lua, then implementing the actual function
in lua, but really, any way we can get that interface is fine.
Whatever's simplest...

Similarly, all we need from posix is "if I'm on a system with
filesystem permissions, I need a way to do chmod +x".  Making it a
no-op on other systems, or just having some code test what system
we're on before even trying to execute it, or whatever -- as long as
it works.  It's definitely not worth trying to port that whole
lposix.c file to Windows...

> I haven't worked together the promised patch yet because I've become 
> sidetracked with doing a VC++ port (which is going moderately well, but 
> will need a bit of discussion here, probably).  I'll try and get to the 
> patch tomorrow and I'll then do an implementation of forkandexec() to 
> see if it meets with approval.

Cool.

-- Nathaniel

-- 
The Universe may  /  Be as large as they say
But it wouldn't be missed  /  If it didn't exist.
  -- Piet Hein




reply via email to

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