vansante / go-ffprobe

Library to easily get the ffprobe output of a given file
MIT License
182 stars 45 forks source link

Process attributes yield a "fork/exec: operation not permitted" error #23

Closed Plenituz closed 4 years ago

Plenituz commented 4 years ago

Hey,

Description of the problem: I've been using this package with AWS lambda for a while and everything was fine until this commit: https://github.com/vansante/go-ffprobe/commit/aa96bd41fb5b153befbd249ff42c5661493b3147#diff-da00c1a6fbe41ec242d1b629be0be533 Ever since this has been added, calling ProbeURL started returning this error: "fork/exec /opt/ffprobe: operation not permitted".

My setup: I have a build of ffprobe stored in an AWS lambda layer that gets put at /opt/ffprobe. My guess is that this issue is very specific to the environment of lambdas where forking a process is not allowed, but executing subprocesses is allowed. And the process attributes that were added by this commit seem to be forcing Go to fork the process. I'm not super familiar with the whole process management part of Go so this is just a guess from what I've seen

Not sure how you would go about fixing this so it works for both windows and AWS lambdas, or if you're even interested in fixing this given how specific it is. For my own setup, I've forked the repo and made the fix, so I'm not looking for a workaround either, just reporting this

vansante commented 4 years ago

Hmm, I suppose I can revert the specific part that sets the Pdeathsig which is likely causing this issue, hold on for a new release soon :)

vansante commented 4 years ago

Should be fixed by https://github.com/vansante/go-ffprobe/releases/tag/v2.0.2 Let me know if it isnt!