]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/process/test/spawn_fail.cpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / libs / process / test / spawn_fail.cpp
1 // Copyright (c) 2006, 2007 Julio M. Merino Vidal
2 // Copyright (c) 2008 Ilya Sokolov, Boris Schaeling
3 // Copyright (c) 2009 Boris Schaeling
4 // Copyright (c) 2010 Felipe Tanus, Boris Schaeling
5 // Copyright (c) 2011, 2012 Jeff Flinn, Boris Schaeling
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9
10 #include <boost/system/error_code.hpp>
11
12 #include <boost/asio.hpp>
13 #include <boost/algorithm/string/predicate.hpp>
14
15 #include <boost/process/error.hpp>
16 #include <boost/process/io.hpp>
17 #include <boost/process/args.hpp>
18 #include <boost/process/spawn.hpp>
19 #include <boost/process/async_pipe.hpp>
20 #include <boost/process/async.hpp>
21 #include <system_error>
22
23 #include <boost/filesystem.hpp>
24
25 #include <string>
26 #include <istream>
27 #include <cstdlib>
28 #if defined(BOOST_WINDOWS_API)
29 # include <windows.h>
30 typedef boost::asio::windows::stream_handle pipe_end;
31 #elif defined(BOOST_POSIX_API)
32 # include <sys/wait.h>
33 # include <unistd.h>
34 typedef boost::asio::posix::stream_descriptor pipe_end;
35 #endif
36
37 namespace fs = boost::filesystem;
38 namespace bp = boost::process;
39
40 int main()
41 {
42 std::error_code ec;
43
44 boost::asio::io_context ios;
45
46 bp::spawn(
47 "dummy",
48 bp::on_exit([](int, const std::error_code&){}),
49 ios,
50 ec
51 );
52 }
53
54
55