$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2005-02-21 04:58:45
Jeff Garland wrote:
> One more reference. We had some discussion about something similar in
> mid-2004. AFAIK it never went anywhere:
>
> http://listarchives.boost.org/MailArchives/boost/msg06882.php
It did go places, but I concentrated on creating a
parse_pseudo_command_line utility rather than on creating the library:
child::spawn_data child_data =
child::parse_pseudo_command_line("ls ../*/*.cpp > files.txt");
See
http://www.devel.lyx.org/~leeming/libs/child/doc/html/child.user_guide.html
I'm firmly of the opinion that such a utility, supporting all of the rules
of some common language (in my case the Bourne shell), would be a very
important addition to any Boost.Child package.
I've recently picked up the baton of what the library itself would need and
started trying to discuss the possible alternatives. See here:
http://www.devel.lyx.org/~leeming/process/
It seems to me that the hardest part of writing such a library isn't the
code to spawn the process in the first place at all. Rather it's the code
to monitor the status of a running process and to notify the rest of the
code when it has exited. I suspect that an Alexandrescu-style policy-based
design will be needed, but with a twist. Once a singleton process_monitor
variable is created, invocation of any other policy should become an
error.
Regards,
Angus