Skip to content

Instantly share code, notes, and snippets.

@pepe
Created September 20, 2021 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pepe/4af26bc3139611ea63fa8f4d91e5d9af to your computer and use it in GitHub Desktop.
Save pepe/4af26bc3139611ea63fa8f4d91e5d9af to your computer and use it in GitHub Desktop.
------------------------------------------------------------
1: os/spawn + 1 pipe (no os/proc-wait nor os/proc-close)
------------------------------------------------------------
* no error
* byte values all seem fine
input buffer length: 70000 bytes
input file length: 70000 bytes
expected length: 70000 bytes
output buffer length: 70000 bytes
output file length: 70000 bytes
------------------------------------------------------------
2: os/spawn + 2 pipes (no os/proc-wait nor os/proc-close)
------------------------------------------------------------
* no error
! but output and error buffer bytes seem insufficient
input buffer length: 70000 bytes
input file length: 70000 bytes
expected length: 70000 bytes
output buffer length: 65536 bytes
output file length: 65536 bytes
error buffer length: 65536 bytes
error file length: 65536 bytes
------------------------------------------------------------
3: os/execute
------------------------------------------------------------
* no error
* byte values seem fine
input buffer length: 70000 bytes
input file length: 70000 bytes
expected length: 70000 bytes
output file length: 70000 bytes
error file length: 70000 bytes
------------------------------------------------------------
4: os/spawn + 2 pipes and os/proc-wait
------------------------------------------------------------
calling os/proc-wait...may fail
! error: "command failed with non-zero exit code 1"
! byte values seem insufficient
input buffer length: 70000 bytes
input file length: 70000 bytes
expected length: 70000 bytes
output buffer length: 65536 bytes
output file length: 65536 bytes
error buffer length: 65536 bytes
error file length: 65536 bytes
------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment