Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
915284ad
Commit
915284ad
authored
Apr 20, 2015
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add notes that UnixEventPort doesn't work after fork().
parent
1859b718
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
async-io.h
c++/src/kj/async-io.h
+6
-0
async-unix.h
c++/src/kj/async-unix.h
+6
-0
No files found.
c++/src/kj/async-io.h
View file @
915284ad
...
...
@@ -477,6 +477,12 @@ AsyncIoContext setupAsyncIo();
// print(text);
// return 0;
// }
//
// WARNING: An AsyncIoContext can only be used in the thread and process that created it. In
// particular, note that after a fork(), an AsyncIoContext created in the parent process will
// not work correctly in the child, even if the parent ceases to use its copy. In particular
// note that this means that server processes which daemonize themselves at startup must wait
// until after daemonization to create an AsyncIoContext.
// =======================================================================================
// inline implementation details
...
...
c++/src/kj/async-unix.h
View file @
915284ad
...
...
@@ -51,6 +51,12 @@ class UnixEventPort: public EventPort {
// The implementation reserves a signal for internal use. By default, it uses SIGUSR1. If you
// need to use SIGUSR1 for something else, you must offer a different signal by calling
// setReservedSignal() at startup.
//
// WARNING: A UnixEventPort can only be used in the thread and process that created it. In
// particular, note that after a fork(), a UnixEventPort created in the parent process will
// not work correctly in the child, even if the parent ceases to use its copy. In particular
// note that this means that server processes which daemonize themselves at startup must wait
// until after daemonization to create a UnixEventPort.
public
:
UnixEventPort
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment