Expand OS\ design notes
#169
Replies: 6 comments 88 replies
Thread: How should a C type that is used like a shape be represented?
|
Thread: How should a C type that is used like a
|
Thread: Non-portable extensions
|
|
Since the goal of |
I'm splitting this out from 'How should a C type that is used like a shape be represented?' as:
I think it's special as it is extremely shape-like: it has both fields, and flags that indicate the presence of these fields. This is necessary as
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Current notes are here: https://github.com/hhvm/hsl/blob/main/src/os/README.md
When discussing subproccess in facebook/hhvm#8946 (cc @Atry), there's some related discussions that should be clarified here; separate threads below, but summarizing here for readability.
Language-based changes
OS\makes changes to the functions when the functions are designed a certain way because of limitations of the C language. For example:errnoon failure, theOS\function returnsvoid, or throws on errorQuestions
posix_spawnattr_t?vec<A|B|C>be represented? For example,posix_spawn_file_actions_t?vec<WeCreateASupertype>withvec[foo_addA(), ...]vec<WeCreateASupertype>withvec[foo_OTHERVERB_a(), ...]given that it's no longer being added to afoo_tvec[foo_t::a(), ...]vec[foo_t\a(), ...]$container = foo_init(); foo_addA($a, ...); foo_addB($b, ...)C API(new container_t())->addA(...)->addB(...)container_t_init()->addA(...)->addB(...)Non-portable extensions
For example, there is
posix_spawn_file_actions_addchdir_npin BSD libc and Glibc (expected without the NP suffix in Issue 8)._npextension...... or should we create
_np_bsd,np_glibc,_np_hhvmsuffixes for clarity?All reactions