- Приложение C. Коды завершения, имеющие предопределенный смысл
- Примечания
- Rsync exit codes
- Contents
- List of standard rsync exit codes
- Exit code 127
- Exit code 255
- Exit code on Linux / UNIX
- Exit code on Windows
- Error code 11 on Windows
- Process exited with code: 127 (npm install) #83
- Comments
- z3ntu commented Jul 8, 2016
- MarshallOfSound commented Jul 9, 2016
- z3ntu commented Jul 9, 2016
- MarshallOfSound commented Jul 9, 2016
- bmathews commented Oct 21, 2016
- MarshallOfSound commented Feb 19, 2017
- The terminal process terminated with exit code: 127 after invalid command enter then exit in Git bash terminal #108881
- Comments
- tpfarul commented Oct 18, 2020
- Tasks return /bin/bash: exit code: 127 when «args» has values #47493
- Comments
- GerardHH commented Apr 9, 2018
- vscodebot bot commented Apr 9, 2018
- dbaeumer commented Apr 9, 2018
Приложение C. Коды завершения, имеющие предопределенный смысл
Таблица C-1. «Зарезервированные» коды завершения
Код завершения | Смысл | Пример | Примечание |
---|---|---|---|
1 | разнообразные ошибки | let «var1 = 1/0» | различные ошибки, такие как «деление на ноль» и пр. |
2 | согласно документации к Bash — неверное использование встроенных команд | Встречаются довольно редко, обычно код завершения возвращается равным 1 | |
126 | вызываемая команда не может быть выполнена | возникает из-за проблем с правами доступа или когда вызван на исполнение неисполняемый файл | |
127 | «команда не найдена» | Проблема связана либо с переменной окружения $PATH, либо с неверным написанием имени команды | |
128 | неверный аргумент команды exit | exit 3.14159 | команда exit может принимать только целочисленные значения, в диапазоне 0 — 255 |
128+n | фатальная ошибка по сигналу «n» | kill -9 $PPID сценария | $? вернет 137 (128 + 9) |
130 | завершение по Control-C | Control-C — это выход по сигналу 2, (130 = 128 + 2, см. выше) | |
255* | код завершения вне допустимого диапазона | exit -1 | exit может принимать только целочисленные значения, в диапазоне 0 — 255 |
Согласно этой таблице, коды завершения 1 — 2, 126 — 165 и 255 [1] имеют предопределенное значение, поэтому вам следует избегать употребления этих кодов для своих нужд. Завершение сценария с кодом возврата exit 127, может привести в замешательство при поиске ошибок в сценарии (действительно ли он означает ошибку «команда не найдена» ? Или это предусмотренный программистом код завершения?). В большинстве случаев, программисты вставляют exit 1, в качестве реакции на ошибку. Так как код завершения 1 подразумевает целый «букет» ошибок, то в данном случае трудно говорить о какой либо двусмысленности, хотя и об информативности — тоже.
Не раз предпринимались попытки систематизировать коды завершения (см. /usr/include/sysexits.h), но эта систематизация предназначена для программистов, пишущих на языках C и C++. Автор документа предлагает ограничить коды завершения, определяемые пользователем, диапазоном 64 — 113 (и, само собой разумеется — 0, для обозначения успешного завершения), в соответствии со стандартом C/C++. Это сделало бы поиск ошибок более простым.
Все сценарии, прилагаемые к данному документу, приведены в соответствие с этим стандартом, за исключением случаев, когда существуют отменяющие обстоятельства, например в Пример 9-2.
electronPath = path . resolve ( argv . e , fs . readFileSync ( pathDotText , ‘utf8’ ) ) ; |
bmathews commented Oct 21, 2016
I got this same error when it tried to spawn electron to get the version number. When I ran that electron command manually, I saw that the real error was that electron wasn’t able to run due to dependency errors like: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory . After fixing that, electron-rebuild worked.
MarshallOfSound commented Feb 19, 2017
We don’t spawn Electron anymore to get the version so closing this out 👍
If it is still an issue (for some weird reason) please comment below 😄
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
The terminal process terminated with exit code: 127 after invalid command enter then exit in Git bash terminal #108881
Comments
tpfarul commented Oct 18, 2020
Steps to reproduce:
- Update Git with latest build (I got v2.28.0.windows.1)
- Update Visual Studio Code (I got v1.50.1)
- Open Visual Studio code from any one directory as a workspace
- Open terminal. In my case default terminal would be Git bash.exe
- enter valid command like ‘$ ls -l’, then type ‘$ exit’ to close. here bash terminal close without any issue
- Open terminal again (steps 4) then enter invalid command ‘$hellovsc’ then type ‘$exit’. here I received ‘The terminal process «C:\Program Files\Git\bin\bash.exe» terminated with exit code: 127.’ error message.
- I suspect invalid command response causing some issue with terminal exit status.
- To confirm step 7 assumption opne terminal again (step 4) then enter a invalid command ‘$hellovsc’ then type a valid command ‘$ls -l’ then type ‘$exit’ to close. This time terminal closed without any error.
Application info
VSC Version: 1.50.1 (user setup)
Commit: d2e414d
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363
GIT: 2.28.0.windows.1
Systems info:
CPUs | Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz (4 x 2400) |
---|---|
GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: disabled_off opengl: enabled_on protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | |
Memory (System) | 7.87GB (1.64GB free) |
Process Argv | —crash-reporter-id 73688476-101c-4294-aa99-13c447d8f5ec |
Screen Reader | no |
VM | 0% |
Extension info:
Extension | Author (truncated) | Version |
---|---|---|
Bookmarks | ale | 11.4.0 |
ng-template | Ang | 0.1001.0 |
All-Autocomplete | Ati | 0.0.23 |
gitlens | eam | 10.2.2 |
go | gol | 0.17.2 |
output-colorizer | IBM | 0.1.2 |
vscode-dimmer-block | ima | 2.2.0 |
vscode-essentials | jab | 1.5.0 |
yuml | Jai | 3.5.1 |
bash-ide-vscode | mad | 1.11.0 |
git-graph | mhu | 1.26.0 |
vscode-docker | ms- | 1.6.0 |
vscode-devskim | MS- | 0.4.193 |
vscode-kubernetes-tools | ms- | 1.2.1 |
mssql | ms- | 1.9.0 |
vscode-postgresql | ms- | 0.3.0 |
python | ms- | 2020.9.114305 |
remote-containers | ms- | 0.145.0 |
remote-ssh | ms- | 0.55.0 |
remote-ssh-edit | ms- | 0.55.0 |
remote-wsl | ms- | 0.50.1 |
vscode-sanddance | msr | 3.1.0 |
subtle-brackets | raf | 3.0.0 |
java | red | 0.69.0 |
vscode-rsp-ui | red | 0.23.5 |
vscode-server-connector | red | 0.23.5 |
vscode-xml | red | 0.13.0 |
vscode-yaml | red | 0.11.1 |
sonarqube-inject | sil | 2.1.0 |
sonarlint-vscode | Son | 1.17.0 |
shellcheck | tim | 0.12.1 |
vscodeintellicode | Vis | 1.2.10 |
vscode-java-debug | vsc | 0.29.0 |
vscode-java-dependency | vsc | 0.13.0 |
vscode-java-pack | vsc | 0.10.0 |
vscode-java-test | vsc | 0.24.2 |
vscode-maven | vsc | 0.24.2 |
The text was updated successfully, but these errors were encountered:
Источник
Tasks return /bin/bash: exit code: 127 when «args» has values #47493
Comments
GerardHH commented Apr 9, 2018
Hallo vscode developers,
It would appear that the newest version of vscode introduces a bug. Currently when I try to run a task with Ctrl+p -> Task task-name I get:
However tasks that have absent «args» keys seems to work though. The issue that most resembles this is #28489. This issue made me try a task without an «args» key.
Side note: I have a SDK that «sources» some environment variables. However v1.21.1 worked fine for me.
- VSCode Version: 1.22.1 950b8b0 x64
- OS Version: openSUSE Leap 42.3
Steps to Reproduce:
- Run a task with an «args» key and filled in value (array with values).
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered:
vscodebot bot commented Apr 9, 2018
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
dbaeumer commented Apr 9, 2018
@GerardHH we fixed bugs around quoting of args which contain special characters like space. Since the comand you use with a shell has args we assume that the command needs to be quoted since it contains spaces. To fix this simply fold the commands into one command line doing:
I warned for awhile when an arg for a shell command had spaces to be folded into the command but sadly I mised the && shell case. I apologize for this. Since handling spaces correctly was a long wanted request I would like to ask you to change your command to make it work again.
Please note that the same applies for your clean-untracked .
Источник