• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

STEllAR-GROUP / hpx / #848

07 Dec 2022 11:00PM UTC coverage: 86.456% (+0.6%) from 85.835%
#848

push

StellarBot
Merge #6096

6096: Forking Boost.Tokenizer r=hkaiser a=hkaiser

- flyby: remove more Boost headers that are not needed anymore

Working towards #3440 

Co-authored-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>

525 of 525 new or added lines in 20 files covered. (100.0%)

173087 of 200202 relevant lines covered (86.46%)

1845223.38 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

51.85
/components/process/include/hpx/components/process/util/posix/initializers/run_exe.hpp
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
//  SPDX-License-Identifier: BSL-1.0
8
// Distributed under the Boost Software License, Version 1.0. (See accompanying
9
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
10

11
#pragma once
12

13
#include <hpx/config.hpp>
14

15
#if !defined(HPX_WINDOWS)
16
#include <hpx/components/process/util/posix/initializers/initializer_base.hpp>
17
#include <hpx/modules/filesystem.hpp>
18
#include <hpx/serialization/string.hpp>
19

20
#include <string>
21

22
namespace hpx::components::process::posix::initializers {
23

24
    class run_exe_ : public initializer_base
1✔
25
    {
26
    public:
27
        run_exe_()
×
28
        {
×
29
            cmd_line_[0] = cmd_line_[1] = nullptr;
×
30
        }
×
31

32
        explicit run_exe_(const std::string& s)
1✔
33
          : s_(s)
1✔
34
        {
1✔
35
            cmd_line_[0] = const_cast<char*>(s_.c_str());
1✔
36
            cmd_line_[1] = nullptr;
1✔
37
        }
1✔
38

39
        template <class PosixExecutor>
40
        void on_exec_setup(PosixExecutor& e) const
1✔
41
        {
42
            e.exe = s_.c_str();
1✔
43
            if (!e.cmd_line)
1✔
44
                e.cmd_line = const_cast<char**>(cmd_line_);
1✔
45
        }
1✔
46

47
    private:
48
        friend class hpx::serialization::access;
49

50
        template <typename Archive>
51
        void save(Archive& ar, unsigned const) const
×
52
        {
53
            ar& s_;
×
54
        }
×
55

56
        template <typename Archive>
57
        void load(Archive& ar, const unsigned int)
×
58
        {
59
            ar& s_;
×
60

61
            cmd_line_[0] = const_cast<char*>(s_.c_str());
×
62
            cmd_line_[1] = nullptr;
×
63
        }
×
64

65
        HPX_SERIALIZATION_SPLIT_MEMBER()
×
66

67
        std::string s_;
68
        char* cmd_line_[2];
69
    };
70

71
    inline run_exe_ run_exe(const char* s)
72
    {
73
        return run_exe_(s);
74
    }
75

76
    inline run_exe_ run_exe(const std::string& s)
1✔
77
    {
78
        return run_exe_(s);
1✔
79
    }
80

81
    inline run_exe_ run_exe(const filesystem::path& p)
82
    {
83
        return run_exe_(p.string());
84
    }
85

86
}    // namespace hpx::components::process::posix::initializers
87

88
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc