cronvel / slash

The hackable shell.
6 stars 0 forks source link

Instead of writing custom bindings use node-ffi #2

Open alexwaeseperlman opened 7 years ago

alexwaeseperlman commented 7 years ago

https://github.com/node-ffi/node-ffi

cronvel commented 7 years ago

What bindings?

I know node-ffi and already used it on a project.

alexwaeseperlman commented 7 years ago

background-process.md Background process management will need some features that does not exist in Node.js.

Interesting SO about foreground/background process management: http://stackoverflow.com/questions/5341220/how-do-i-get-tcsetpgrp-to-work-in-c

I may need to write my bindings to tcsetpgrp(), tcgetpgrp(), or use this undocumented package: https://www.npmjs.com/package/termcontrol

May also need setpgid(), setpgrp(), getpgrp().

cronvel commented 7 years ago

Thanks, but IFAIK there are chances that both the native way and the node-ffi way require the same amount of work, and would be potentially equally error-prone.

Will think about it when I will start working on background process management.