HomePhabricator

[GraphWriter] Don't wait on xdg-open when not on Apple.

Description

[GraphWriter] Don't wait on xdg-open when not on Apple.

By default, the GraphWriter code assumes that the generic file open
program (open on Apple, xdg-open on other systems) can wait on the
forked proces to complete. When the fork ends, the code would delete
the temporary dot files created, and return.

On GNU/Linux, the xdg-open program does not have a "wait for your fork
to complete before dying" option. So the behaviour was that xdg-open
would launch a process, quickly die itself, and then the GraphWriter
code would think its OK to quickly delete all the temporary files.
Once the temporary files were deleted, the dot viewers would get very
upset, and often give you weird errors.

This change only waits on the generic open program on Apple platforms.
Elsewhere, we don't wait on the process, and hence we don't try and
clean up the temporary files.

Details

Committed
chatur01Jul 2 2015, 2:32 AM
Parents
rL241249: [NFC] Minor editorial fixes to the CodeGen docs.
Branches
Unknown
Tags
Unknown