[pypy-dev] [PATCH] fix executing a file under sandbox by implementing fstat

Antonio Cuni anto.cuni at gmail.com
Fri Apr 1 11:23:52 CEST 2011


Hello Seth,
thank you for your patch!

On 01/04/11 02:27, Seth de l'Isle wrote:
[cut]
> The following patch changes the code so that it tracks the virtual
> file system nodes that correspond to each virtual file descriptor so
> that the node.stat() function can
> be used for fstat the same way it is used for stat.

could you please write the corresponding test in test_sandlib.py please?


> +    def do_ll_os__ll_os_fstat(self, fd):
> +        node = self.fd_to_node[fd]
> +        return node.stat()

Also, you probably need to handle the case in which we call fstat with a fd
which doesn't exist (and write the corresponding test :-))

ciao,
Anto



More information about the Pypy-dev mailing list