ajout un fonctionnement signaux avec heredoc

This commit is contained in:
hugogogo
2021-11-18 17:20:19 +01:00
parent c11c61ec5e
commit 74ee526d57
3 changed files with 35 additions and 13 deletions

View File

@@ -123,18 +123,40 @@ test
- [infos ici](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_05_03)
6. un heredoc interrompu par un Ctrl-D n'arrete pas la pipeline, mais un Ctrl-C si :
```text
[bash]$ echo << EOF | wc
> ^D bash: warning: here-document at line 1 delimited by end-of-file (wanted `EOF')
1 0 1
[bash]$ echo << EOF | wc
> ^C
[bash]$
```
## schema d'execution :
```text
_________________________________________________
|LOOP: shell_loop() |
| signal(SIGINT, handler) |
| mode interactif -> readline return line_input |
| signal(SIGINT, ignore) |
| lexing |
| parsing |
| execution |
|_________________________________________________|
________________________________________________
|LOOP: shell_loop() |
| ______________________________________________ |
||mode interactif ||
|| *signal(SIGINT, handler)* ||
|| readline return line_input ||
||______________________________________________||
| ______________________________________________ |
||mode execution ||
|| *signal(SIGINT, ignore)* ||
|| ____________________________________________ ||
||| lexing |||
|||____________________________________________|||
|| ____________________________________________ ||
||| parsing |||
|||____________________________________________|||
|| ____________________________________________ ||
||| execution |||
|||____________________________________________|||
||______________________________________________||
|________________________________________________|
```