From 0adc53cd1134c5b20d72efd3e020369d3e894e15 Mon Sep 17 00:00:00 2001 From: Adrien DELSALLE Date: Wed, 3 Nov 2021 14:33:41 +0100 Subject: [PATCH] add a note about status codes in readme detail that err code won't reflect unexpected sigkill or sigterm --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 62cc299ee..e7e940d5e 100644 --- a/README.md +++ b/README.md @@ -225,6 +225,16 @@ occurred. You can test against these error codes using values from the See the examples for more information on how to handle errors when using reproc. +Note: + +Both reproc and reproc++ APIs take `options` argument that may define one or more +`stop` actions such as `terminate` or `kill`. +For that reason if the child process is being terminated or killed using a signal +on POSIX, the error code will **not** reflect an error. + +It's up to the downstream project to *interpret* status codes reflecting unexpected +behaviors alongside error codes (see this [example](https://github.com/DaanDeMeyer/reproc/issues/68#issuecomment-959074504)). + ## Multithreading Don't call the same operation on the same child process from more than one