Question: I have issue with parsing following json

```
"name.regex" : "/^\s*.{1,500}\s*$/"

```

i getting the following exception

```
Uncaught SyntaxError: Unexpected token ' in JSON at position 170

```

Answer: 
I hope this answer is not too late.

Minutes ago, I have emailed Remiz(this book's author), and got such a replay(extract some segments):

> 
> Without calling wait() is hard, and not really the main point.
> What you did -- learning about signals on your own -- is a good sign,
> showing you will seek out deeper knowledge. Good for you!
> 
> 
> 

> 
> Later, you'll be able to use a shared memory segment, and
> either condition variables or semaphores, to solve this problem.
> 
> 
>
Create a pipe in the parent. After `fork`, close the write half in the parent and the read half in the child.

Then, `poll` for readability. Since the child never writes to it, it will wait until the child (and all grandchildren, unless you take special care) no longer exists, at which time `poll` will give a "read with hangup" response. (Alternatively, you could actually communicate over the pipe).

You should read about `O_CLOEXEC`. As a general rule, that flag should always be set unless you have a good reason to clear it.