tinylibs / tinyexec

📟 A tiny, higher level interface around child_process
MIT License
109 stars 2 forks source link

expose signal that killed the process #28

Open SuperchupuDev opened 1 month ago

43081j commented 1 month ago

this may be as simple as introducing a getter for signalCode which is a pass through to process.signalCode

SuperchupuDev commented 1 month ago

thatd be nice, but i just noticed i worded the feature request wrong 😅 i meant more of exposing it when spawn errors get thrown but that can work too

43081j commented 1 month ago

when a spawn fails, it won't be a signal but will be a regular JS exception (e.g. if the command doesn't exist)

when the command does exist but exits for some reason, process.signalCode will tell you why