in reply to Re^2: Dancer and forking
in thread Dancer and forking
The forked child process is meant to return the content, not to the parent process, but to the connected client. The exit causes all open file handles to be flushed and closed. Thus the content is delivered to the client.
Without the exit, the forked child would continue to execute the parent's code after returning from the anonymous sub.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Dancer and forking
by Anonymous Monk on Apr 30, 2018 at 11:42 UTC |