# Access db from forked process

**URL:** <https://forums.foundationdb.org/t/access-db-from-forked-process/2857>\
**Category:** Using FoundationDB\
**Created:** [August 20, 2021, 7:11pm UTC](https://forums.foundationdb.org/t/access-db-from-forked-process/2857 "2021-08-20T19:11:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ajbeamon](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/ajbeamon/32/13_2.png) [@ajbeamon](https://forums.foundationdb.org/u/ajbeamon)\
**Post date:** [August 23, 2021, 12:26am UTC](https://forums.foundationdb.org/t/access-db-from-forked-process/2857/2 "2021-08-23T00:26:07Z")

</div>

See the post below for a little discussion of this. The conclusion there was that you’ll need to connect to FDB after you fork rather than before in order for the client network thread to work properly.

> [@Fork and indefinite blocking of fdb\_future\_block\_until\_ready](https://forums.foundationdb.org/t/fork-and-indefinite-blocking-of-fdb-future-block-until-ready/560):
>
> Hi, I tried to couple a (pre)forking socket server with foundationDB, using the C API directly. The socket server is a slight modification of [https://gist.github.com/paulsmith/204301](https://gist.github.com/paulsmith/204301) for unix domain sockets. A client connects with an input that ultimately translates into a key to be looked up in a foundationDB database. Using a variation of function getKey in I intended to send the value corresponding to the key back to the client. Everything works as intended when I disable forking all…

---

_[View the full topic](https://forums.foundationdb.org/t/access-db-from-forked-process/2857)._
