Hacker News new | past | comments | ask | show | jobs | submit login

That's an awesome technique, thanks for it! It is Linux-specific though.



It's also useful for signaling between processes to have them continue doing something as long as this proc path exists (the fd can also just be backed with >/dev/null instead of a real file that needs to be removed)


Normally, the pid and fd could be reused, so you should either make it a known unique path and verify it's still the same, lock the pid via some means (not sure if and how it's possible), or use another technique.


For creating some kind IPC, i would create a named fifo or even use coproc (see man bash)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: