Switch to unified view

a/src/utils/execmd.h b/src/utils/execmd.h
...
...
80
     * times for several variables).
80
     * times for several variables).
81
     * @param envassign an environment assignment string ("name=value")
81
     * @param envassign an environment assignment string ("name=value")
82
     */
82
     */
83
    void putenv(const std::string &envassign);
83
    void putenv(const std::string &envassign);
84
    void putenv(const std::string &name, const std::string& value);
84
    void putenv(const std::string &name, const std::string& value);
85
86
    /** 
87
     * Try to set a limit on child process vm size. This will use
88
     * setrlimit() and RLIMIT_AS/VMEM if available. Parameter is in
89
     * units of 2**10. Must be called before starting the command, default 
90
     * is inherit from parent.
91
     */
92
    void setrlimit_as(int mbytes);
85
93
86
    /** 
94
    /** 
87
     * Set function objects to call whenever new data is available or on
95
     * Set function objects to call whenever new data is available or on
88
     * select timeout / whenever new data is needed to send. Must be called
96
     * select timeout / whenever new data is needed to send. Must be called
89
     * before doexec()
97
     * before doexec()
...
...
156
     * Get rid of current process (become ready for start). 
164
     * Get rid of current process (become ready for start). 
157
     */
165
     */
158
    void zapChild() {setKill(); (void)wait();}
166
    void zapChild() {setKill(); (void)wait();}
159
167
160
    ExecCmd()
168
    ExecCmd()
161
    : m_advise(0), m_provide(0), m_timeoutMs(1000)
169
    : m_advise(0), m_provide(0), m_timeoutMs(1000), m_rlimit_as_mbytes(0)
162
    {
170
    {
163
    reset();
171
    reset();
164
    }
172
    }
165
    ~ExecCmd();
173
    ~ExecCmd();
166
174
...
...
189
    std::vector<std::string>   m_env;
197
    std::vector<std::string>   m_env;
190
    ExecCmdAdvise   *m_advise;
198
    ExecCmdAdvise   *m_advise;
191
    ExecCmdProvide  *m_provide;
199
    ExecCmdProvide  *m_provide;
192
    bool             m_killRequest;
200
    bool             m_killRequest;
193
    int              m_timeoutMs;
201
    int              m_timeoutMs;
202
    int              m_rlimit_as_mbytes;
194
    std::string           m_stderrFile;
203
    std::string           m_stderrFile;
195
    // Pipe for data going to the command
204
    // Pipe for data going to the command
196
    int              m_pipein[2];
205
    int              m_pipein[2];
197
    NetconP          m_tocmd;
206
    NetconP          m_tocmd;
198
    // Pipe for data coming out
207
    // Pipe for data coming out