`ChildProcess.run` puts `null` or a string into `exitCode : Int` after a timeout, a signal or too much output
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 74/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, node.js
Línea de trabajo
Start with Gren/Kernel/ChildProcess.js and run the linked 2026-09-14-childprocess-exitcode reproduction in gren-bug-reports. Inspect how execFile errors map err.code, err.killed, and err.signal into ProgramError, then cover normal exit, timeout, signal, and maximum-output cases with regression tests. Done means exitCode consistently matches its declared Int type and the termination cases remain distinguishable.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found against: gren 0.6.6, gren-lang/core 7.4.2, gren-lang/node 6.1.3, node 22
Reproduction: in https://github.com/gilramir/gren-bug-reports, 2026-09-14-childprocess-exitcode; ./run.sh prints the run
below.
Summary
ChildProcess.run fails with ProgramError { exitCode : Int, … } whenever the
program was started and did not succeed. When the program did not exit with a
code, which is what runDuration and a signal do, and when it wrote more than
maximumBytesWrittenToStreams, exitCode is not an Int:
| how the program ended | String.fromInt e.exitCode |
e.exitCode + 1 |
e.exitCode > 0 |
|---|---|---|---|
sh -c "exit 3" |
3 |
4 |
True |
stopped by runDuration = Milliseconds 100 |
null |
1 |
False |
wrote past maximumBytesWrittenToStreams = 4 |
ERR_CHILD_PROCESS_STDIO_MAXBUFFER |
ERR_CHILD_PROCESS_STDIO_MAXBUFFER1 |
False |
killed by a signal (kill -9 $$) |
null |
1 |
False |
Every value in the last three rows is one no Int can be, so a program that
checks the exit code gets an answer that means nothing, and arithmetic on it
yields a string. A program cannot tell a timeout from a signal, or either from
too much output, except by inspecting a value its type says is a number.
The cause is in Gren/Kernel/ChildProcess.js, where execFile's error becomes
the ProgramError:
__$exitCode: err.code,
Node's err.code is the exit code only when the process exited. After a
timeout or a signal it is null, and err.killed and err.signal say what
happened. When the output passed maxBuffer it is the error's own code, the
string ERR_CHILD_PROCESS_STDIO_MAXBUFFER.
Reproduction
$ node app
exit 3: ProgramError, exitCode = 3, exitCode + 1 = 4, exitCode > 0 = True
killed by runDuration: ProgramError, exitCode = null, exitCode + 1 = 1, exitCode > 0 = False
past maximumBytesWrittenToStreams: ProgramError, exitCode = ERR_CHILD_PROCESS_STDIO_MAXBUFFER, exitCode + 1 = ERR_CHILD_PROCESS_STDIO_MAXBUFFER1, exitCode > 0 = False
killed by a signal: ProgramError, exitCode = null, exitCode + 1 = 1, exitCode > 0 = False
- Lenguaje dominante
- JavaScript
- Estrellas
- 13
- Forks
- 6
- Merge medio
- 4 d 10 h
- PR fusionados (30 d)
- 4
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de gren-lang/node
-
`ChildProcess.spawn` with `NoShell` looks for a program named after the program and its argumentsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
Sqlite: Bytes encoder/decoderAbiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Todos los issues de gren-lang/node
Issues similares
-
Add: Digi 4K LogoAbiertocheck:passed logos:add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
component/administration domain/framework needs-triage Platform(Default) priority/low
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
semantic-release/gitlab#1032 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
[aw] Upgrade availableAbiertoagentic-workflows
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
githubnext/gh-aw-workshop#3933 ·
Los mantenedores suelen responder en 2 días