How to get script/runner to write its PID to a file?

Hello!

I must be missing something obvious (and yet I have tried a lot of
things):

how can you get script/runner to write its PID to a file (and specify
the location)?

I could do it manually in the code itself, but I guess this
functionality is built-in already.

Thanks!
Peter

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs