Opened 14 years ago
Closed 6 years ago
#246 closed enhancement (wontfix)
Make working directory a per-thread property
Reported by: | Jiri Svoboda | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | helenos/lib/c | Version: | mainline |
Keywords: | Cc: | ||
Blocker for: | Depends on: | ||
See also: |
Description
Currently the working directory is a property of the task as a whole (same as in POSIX). This is incompatible with multi-threaded applications.
I propose to change WD to be a thread(fibril)-local property.
Compatibility analysis: This will not affect single-threaded POSIX applications. This could only break multi-threaded POSIX applications that rely on setting WD in one thread and then accessing it in another. It could be fixed in the prospective POSIX compatibility layer, however.
Change History (7)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Milestone: | 0.5.0 → 0.5.1 |
---|
comment:3 by , 14 years ago
I don't quite follow. Can you elaborate on this and perhaps give an example?
comment:4 by , 14 years ago
This was a reaction to making it a per-thread property. As fibrils can move among threads, their cwd would change accordingly. If it was a per-fibril property, I don't see any problem.
comment:5 by , 14 years ago
Type: | proposal → enhancement |
---|
comment:6 by , 13 years ago
Milestone: | 0.5.0 |
---|
comment:7 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I changed my mind. Global state is bad. Thread- or fibril-specific global state is even worse. If an application requires more fine control, it should specify the base directory explicitly.
I am concerned about the possible complications this could cause given the way we use kernel threads - i.e. as execution units for fibrils.