You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 62d313b
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ with compile-time platform constants and a few platform modules.
6
6
7
7
```toml
8
8
[dependencies]
9
-
os = { namespace = "mcpplibs", version = "0.2.9" }
9
+
os = { namespace = "mcpplibs", version = "0.3.0" }
10
10
```
11
11
12
12
```cpp
@@ -34,6 +34,29 @@ what is not a kernel question: the machine beneath the system (`machine`), the d
34
34
loader (`library`: the C library's on Linux and macOS, kernel32's on Windows), and the
35
35
platform modules.
36
36
37
+
## Declared process units
38
+
39
+
Version 0.3.0 provides `process::owned_unit` and the observation-only
40
+
`process::unit_observer`. Create an owned unit before starting its external
41
+
members, retain `reference()` in the supervising invocation, and pass the unit
42
+
through `spawn_options::declared_unit`. The existing `process::spawn` performs
43
+
the start. The creating program is a member; `terminate()` can end it too.
44
+
`own_unit` and `declared_unit` are mutually exclusive.
45
+
46
+
An observer opens that opaque reference and reports `unit_state::occupied`,
47
+
`empty` or `unknown`. Its type exposes neither admission nor termination.
48
+
Closing it terminates nothing. Missing native identity, including loss of all
49
+
native reference holders on a system that requires them, remains `unknown`.
50
+
51
+
`owned_unit::retire(continuation)` seals admission before observing the end of
52
+
external members. The continuation identifies the surviving supervising
53
+
program outside the helper's unit, obtained from `self` or `describe` with
54
+
both identifier and birth retained. A dead, reused or
55
+
unreachable continuation does not authorize membership migration. The caller
56
+
can finish its bookkeeping after successful retirement. Retirement does not
57
+
grant control of the continuation's unit. Output recovery requires a positive
58
+
`empty` observation; leader termination alone is insufficient.
59
+
37
60
## The program's C library
38
61
39
62
A program over this package chooses its C library. It can be the system's own (glibc,
@@ -87,7 +110,7 @@ dropped (0.2.8).
87
110
| `mcpplibs.os.error` | `errc` (openkal's closed set of conditions), `error`, `result<T>` |
88
111
| `mcpplibs.os.env` | variables (names without case on Windows), `NAME=value` entries as overrides (`assignments`), arguments, the program's own image, lists of directories in the host's separator (`split_list`, `join_list`), PATH search with PATHEXT |
89
112
| `mcpplibs.os.fs` | `write_atomic`, `publish` (no replace), `append`, `sync`, `caps`, `lock`, links, `set_executable`, `stamp_of`, `identity_of`, `owner_of`, `writable`, `locate`, `absolute`, `names_a_place`, `canonical`, a bounded `read`; what a volume does, measured (`measure`, `volume_type`), and the operations that follow it (`place`, `exchange`); names in the host's rules without the file system: `generic`, `native`, `extended`, `is_absolute`, `same`, `within` |
90
-
| `mcpplibs.os.process` | `spawn`, `run` (and with bounds: a hard bound, a grace, a drain, output limits), `exec`, a command line joined as it is for the command interpreter (`one_string`), pipes, both outputs on one pipe, output onto this program's error output, units and `end_unit`, bound lifetime, bounded waits and reads; `self`, `describe`, `alive`, `threads` |
113
+
| `mcpplibs.os.process` | `spawn`, `run` (and with bounds: a hard bound, a grace, a drain, output limits), `exec`, a command line joined as it is for the command interpreter (`one_string`), pipes, both outputs on one pipe, output onto this program's error output, units and `end_unit`, declared units, observation and retirement, bound lifetime, bounded waits and reads; `self`, `describe`, `alive`, `threads` |
Copy file name to clipboardExpand all lines: mcpp.toml
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
[package]
2
2
namespace = "mcpplibs"
3
3
name = "os"
4
-
version = "0.2.9"
4
+
version = "0.3.0"
5
5
description = "mcpplibs.os: a C++ operating-system library over openkal --- processes, files, environment, terminals, directories and local IPC, with compile-time platform constants and a few platform modules."
0 commit comments