projects: purge perl's perfidious file handle trickery
commit03f159144070e85bec4a0e706951cd634ef8daf4
authorKyle J. McKay <mackyle@gmail.com>
Wed, 6 Dec 2017 01:52:13 +0000 (5 17:52 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 6 Dec 2017 01:52:13 +0000 (5 17:52 -0800)
tree9d6ebac1f43efa94167e303b5066b0ea8a0a294b
parent1ccb569a41ce42c169be226f18fd4aafb76f70ba
projects: purge perl's perfidious file handle trickery

When spawning a git or shell command, we are not interested in what
the perl filehandles are set to; they may be tied objects or have
unanticipated file descriptor numbers.

We do, however, care greatly about where the underlying file
descriptors 0, 1 and 2 point to as those will become the spanwed
process's STDIN, STDOUT and STDERR respectively.

Therefore make use of the various POSIX APIs to manipulate the file
descriptors directly to make sure they end up pointing to the
intended target before spawning a sub process.

Also take this opportunity to replace the few remaining bare
'/dev/null' strings with the more portable File::Spec->devnull
result.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Project.pm
taskd/taskd.pl