diff options
| -rw-r--r-- | docs/nofork_noexec.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/nofork_noexec.txt b/docs/nofork_noexec.txt index 9d210a1c9..a20c1ec96 100644 --- a/docs/nofork_noexec.txt +++ b/docs/nofork_noexec.txt | |||
| @@ -56,6 +56,11 @@ roughly are: | |||
| 56 | (although usually xfunc_error_retval's state is not a problem). | 56 | (although usually xfunc_error_retval's state is not a problem). |
| 57 | * do not expect that stdio wasn't used before. Calling set[v]buf() | 57 | * do not expect that stdio wasn't used before. Calling set[v]buf() |
| 58 | can be disastrous. | 58 | can be disastrous. |
| 59 | * the parent program's signal handlers will not be reset to SIG_DFL | ||
| 60 | (on exec, they are, but we avoid exactly that). | ||
| 61 | This means that signals will cause a part of _parent's code_ | ||
| 62 | to execute, and may cause EINTR returns from syscalls | ||
| 63 | in the NOEXEC applet code. | ||
| 59 | * ... | 64 | * ... |
| 60 | 65 | ||
| 61 | NOEXEC applets save only one half of fork+exec overhead. | 66 | NOEXEC applets save only one half of fork+exec overhead. |
| @@ -76,7 +81,7 @@ This poses much more serious limitations on what applet can do: | |||
| 76 | hush shell only handles signals (like ^C) after you return | 81 | hush shell only handles signals (like ^C) after you return |
| 77 | from APPLET_main(). | 82 | from APPLET_main(). |
| 78 | * do not ever exit() or exec(). | 83 | * do not ever exit() or exec(). |
| 79 | - xfuncs are okay. They are using special trick to return | 84 | - xfuncs are okay. They use special trick to return |
| 80 | to the caller applet instead of dying when they detect "x" condition. | 85 | to the caller applet instead of dying when they detect "x" condition. |
| 81 | - you may "exit" to caller applet by calling xfunc_die(). Return value | 86 | - you may "exit" to caller applet by calling xfunc_die(). Return value |
| 82 | is taken from xfunc_error_retval. | 87 | is taken from xfunc_error_retval. |
