Let Daemon.spawn stick random stuff into argv
commita0eefeb4b5d2c442657e0c22e1e776226b58d91a
authorGabe Levi <gabe@fb.com>
Fri, 10 Nov 2017 22:44:03 +0000 (10 14:44 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 10 Nov 2017 22:56:27 +0000 (10 14:56 -0800)
treeae62c6da807ab61d551da4ef329ac6e29545894c
parent4c17c516086c5f5708b25058cf0c3a928884bfc1
Let Daemon.spawn stick random stuff into argv

Summary:
`Daemon.spawn` starts a new process. That new process calls
`Daemon.check_entry_point` and never returns. This always happens before
command line args are parsed.

That means you can really put whatever you like into the arg list for
the spawned process.

The Flow team often gets questions about why are there so many flow
processes. These questions are usually from people who are looking at
`ps`. Well, we can make these processes self-documenting but sticking
reasons directly into their args.

Unfortunately, this doesn't help processes which are forked. They'll
always have the same args as their parent process.

Reviewed By: alexchow

Differential Revision: D6264263

fbshipit-source-id: f3fd313b9a4a1db885b8e146ecc2836129fdb2a1
hphp/hack/src/dfind/dfindLib.ml
hphp/hack/src/procs/worker.ml
hphp/hack/src/utils/sys/daemon.ml
hphp/hack/src/utils/sys/daemon.mli