Title: [Patch] Make os.chdir() optional
Type: Stage:
Components: Extension Modules Versions: Python 3.6
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: EdSchouten, nanjekyejoannah
Priority: normal Keywords: patch

Created on 2016-10-22 05:46 by EdSchouten, last changed 2019-06-11 19:49 by nanjekyejoannah.

File name Uploaded Description Edit
chdir-optional.diff EdSchouten, 2016-10-22 05:46 Patch for making os.chdir() optional. review
Messages (2)
msg279183 - (view) Author: Ed Schouten (EdSchouten) * Date: 2016-10-22 05:46
CloudABI is a POSIX-like strongly sandboxed runtime environment, for which we got Python to work ( Patches for this are slowly being upstreamed.

CloudABI uses a capability-based security model, similar to Capsicum ( With this model, the file system can only be accessed by using file descriptors to directories. Files inside of them can be used by using openat() (in Python: This means that there is no need to provide support for process working directories. chdir() is therefore entirely absent.

It looks like chdir() is only used by Python in its posixmodule. The attached patch adds a new Autoconf check and adds the proper #if logic around its implementation.

Changes to the Autoconf/Automake files are not provided by this patch, as my versions of these tools generate files containing unnecessary changes.
msg345263 - (view) Author: Joannah Nanjekye (nanjekyejoannah) * (Python committer) Date: 2019-06-11 19:49
@ Ed Schouten, are you still interested in solving this? If so, please convert your patch into a PR.
Date User Action Args
2019-06-11 19:49:05nanjekyejoannahsetnosy: + nanjekyejoannah
messages: + msg345263
2016-10-22 05:46:35EdSchoutencreate