tests ok pour modifier fonctionnement de minishell
This commit is contained in:
25
README.md
25
README.md
@@ -1,9 +1,30 @@
|
||||
## understanding some things :
|
||||
- [how to send EOF to stdin of a shell process](https://unix.stackexchange.com/questions/493578/how-to-send-d-eot-character-to-stdin-of-a-shell-process)
|
||||
- [get root access 1](https://vitux.com/how-to-become-root-user-in-ubuntu-command-line-using-su-and-sudo/)
|
||||
- [get root access using sudo su](https://superuser.com/questions/408990/how-do-i-log-out-of-sudo-su)
|
||||
- [get root access 1](https://vitux.com/how-to-become-root-user-in-ubuntu-command-line-using-su-and-sudo/)
|
||||
- [get root access using sudo su](https://superuser.com/questions/408990/how-do-i-log-out-of-sudo-su)
|
||||
- [what is a tty](https://www.howtogeek.com/428174/what-is-a-tty-on-linux-and-how-to-use-the-tty-command/)
|
||||
|
||||
```
|
||||
| BASH | MINISHELL |
|
||||
-----------------------------------
|
||||
| print | action | print | action |
|
||||
---------------|-----------------|----------------|----------------|
|
||||
| SIGINT / ctrl-C | ^C | \n | ^C | exit |
|
||||
prompt> |-----------------|----------------|----------------|
|
||||
| EOF / ctrl-D | exit | exit | Ø | \n |
|
||||
---------------|-----------------|----------------|----------------|
|
||||
| SIGINT / ctrl-C | bla^C | \n | bla^C | exit |
|
||||
prompt> blabla |-----------------|----------------|----------------|
|
||||
| EOF / ctrl-D | Ø | Ø | Ø | Ø |
|
||||
---------------|-----------------|----------------|----------------|
|
||||
|
||||
-> change signal handler for SIGINT, to print a \n instead of exit
|
||||
-> change when readline receive an EOF and line is empty, to print exit and exit
|
||||
-> when readline receive an EOF and line is empty, it return NULL
|
||||
-> if line isn't empty it does nothing
|
||||
|
||||
```
|
||||
|
||||
## sommaire :
|
||||
---
|
||||
- [1. todo list :](#markdown-header-1-todo-list)
|
||||
|
||||
Reference in New Issue
Block a user