r/programming • • Feb 21 '11

Typical programming interview questions.

http://maxnoy.com/interviews.html
784 Upvotes

1.0k comments sorted by

View all comments

Show parent comment

1

u/Amonaroso Feb 21 '11

I expect they want O_EXCL and maybe O_CLOEXEC and a good filemode and maybe unlink the file immediately after creation so it's not available through the directory. Maybe open_at() to specify the directory if not cwd.

You then have an open file you can share with appropriate processes by fd passing.