shell_path.hpp
Go to the documentation of this file.
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 /**
11  * \file boost/process/shell_path.hpp
12  *
13  * Defines a function to return the absolute path to a shell executable.
14  */
15 
16 #pragma once
17 
18 #include <boost/process/config.hpp>
19 
20 #include BOOST_PROCESS_PLATFORM_PROMOTE_PATH(shell_path)
21 BOOST_PROCESS_PLATFORM_PROMOTE_NAMESPACE(shell_path)
22 
23 #if defined(BOOST_PROCESS_DOXYGEN)
24 namespace boost::process
25 {
26 
27  /**
28  * Returns the absolute path to a shell executable.
29  *
30  * \returns the path to cmd.exe on Windows and /bin/sh on POSIX.
31  *
32  * \throws boost::system::system_error in case of an error
33  */
34  std::filesystem::path shell_path();
35 
36  /**
37  * Returns the absolute path to a shell executable.
38  *
39  * \returns the path to cmd.exe on Windows and /bin/sh on POSIX.
40  */
41  std::filesystem::path shell_path(boost::system::error_code& ec);
42 
43 }
44 #endif
45 
boost::process
Definition: mitigate.hpp:25
config.hpp
boost::process::windows::shell_path
std::filesystem::path shell_path(boost::system::error_code &ec)
Definition: shell_path.hpp:32