microsoft / node-pty

Fork pseudoterminals in Node.JS
Other
1.42k stars 233 forks source link

Debt: don't expose handles in API #606

Closed rzhao271 closed 1 year ago

rzhao271 commented 1 year ago

Actually looking at the handle usages expose to JS, ex: innerPidHandle, handle etc they are only used for internal implementation. I would suggest to remove them from being exposed to JS and operate on pid values instead, on the native side extract the handle when needed using OpenProcess.

_Originally posted by @deepak1556 in https://github.com/microsoft/node-pty/pull/584#discussion_r1129001078_

Tyriar commented 1 year ago

Actually let's fix in that PR, see https://github.com/microsoft/node-pty/pull/584#discussion_r1228154141