-rw-r--r-- | libopie/oprocess.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/libopie/oprocess.h b/libopie/oprocess.h index f2853b0..af7cddb 100644 --- a/libopie/oprocess.h +++ b/libopie/oprocess.h | |||
@@ -261,102 +261,96 @@ public: | |||
261 | * For a detailed description of the | 261 | * For a detailed description of the |
262 | * various run modes and communication semantics, have a look at the | 262 | * various run modes and communication semantics, have a look at the |
263 | * general description of the OProcess class. | 263 | * general description of the OProcess class. |
264 | * | 264 | * |
265 | * The following problems could cause this function to | 265 | * The following problems could cause this function to |
266 | * return false: | 266 | * return false: |
267 | * | 267 | * |
268 | * @li The process is already running. | 268 | * @li The process is already running. |
269 | * @li The command line argument list is empty. | 269 | * @li The command line argument list is empty. |
270 | * @li The starting of the process failed (could not fork). | 270 | * @li The starting of the process failed (could not fork). |
271 | * @li The executable was not found. | 271 | * @li The executable was not found. |
272 | * | 272 | * |
273 | * @param comm Specifies which communication links should be | 273 | * @param comm Specifies which communication links should be |
274 | * established to the child process (stdin/stdout/stderr). By default, | 274 | * established to the child process (stdin/stdout/stderr). By default, |
275 | * no communication takes place and the respective communication | 275 | * no communication takes place and the respective communication |
276 | * signals will never get emitted. | 276 | * signals will never get emitted. |
277 | * | 277 | * |
278 | * @return true on success, false on error | 278 | * @return true on success, false on error |
279 | * (see above for error conditions) | 279 | * (see above for error conditions) |
280 | **/ | 280 | **/ |
281 | virtual bool start(RunMode runmode = NotifyOnExit, | 281 | virtual bool start(RunMode runmode = NotifyOnExit, |
282 | Communication comm = NoCommunication); | 282 | Communication comm = NoCommunication); |
283 | 283 | ||
284 | /** | 284 | /** |
285 | * Stop the process (by sending it a signal). | 285 | * Stop the process (by sending it a signal). |
286 | * | 286 | * |
287 | * @param signoThe signal to send. The default is SIGTERM. | 287 | * @param signoThe signal to send. The default is SIGTERM. |
288 | * @return @p true if the signal was delivered successfully. | 288 | * @return @p true if the signal was delivered successfully. |
289 | */ | 289 | */ |
290 | virtual bool kill(int signo = SIGTERM); | 290 | virtual bool kill(int signo = SIGTERM); |
291 | 291 | ||
292 | /** | 292 | /** |
293 | @return @p true if the process is (still) considered to be running | 293 | @return @p true if the process is (still) considered to be running |
294 | */ | 294 | */ |
295 | bool isRunning() const; | 295 | bool isRunning() const; |
296 | 296 | ||
297 | /** Returns the process id of the process. | 297 | /** Returns the process id of the process. |
298 | * | 298 | * |
299 | * If it is called after | 299 | * If it is called after |
300 | * the process has exited, it returns the process id of the last | 300 | * the process has exited, it returns the process id of the last |
301 | * child process that was created by this instance of OProcess. | 301 | * child process that was created by this instance of OProcess. |
302 | * | 302 | * |
303 | * Calling it before any child process has been started by this | 303 | * Calling it before any child process has been started by this |
304 | * OProcess instance causes pid() to return 0. | 304 | * OProcess instance causes pid() to return 0. |
305 | **/ | 305 | **/ |
306 | pid_t pid() const; | 306 | pid_t pid() const; |
307 | 307 | ||
308 | /** | 308 | /** |
309 | * Use pid(). | ||
310 | * @deprecated | ||
311 | */ | ||
312 | pid_t getPid() const { return pid(); } | ||
313 | |||
314 | /** | ||
315 | * Suspend processing of data from stdout of the child process. | 309 | * Suspend processing of data from stdout of the child process. |
316 | */ | 310 | */ |
317 | void suspend(); | 311 | void suspend(); |
318 | 312 | ||
319 | /** | 313 | /** |
320 | * Resume processing of data from stdout of the child process. | 314 | * Resume processing of data from stdout of the child process. |
321 | */ | 315 | */ |
322 | void resume(); | 316 | void resume(); |
323 | 317 | ||
324 | /** | 318 | /** |
325 | * @return @p true if the process has already finished and has exited | 319 | * @return @p true if the process has already finished and has exited |
326 | * "voluntarily", ie: it has not been killed by a signal. | 320 | * "voluntarily", ie: it has not been killed by a signal. |
327 | * | 321 | * |
328 | * Note that you should check @ref OProcess::exitStatus() to determine | 322 | * Note that you should check @ref OProcess::exitStatus() to determine |
329 | * whether the process completed its task successful or not. | 323 | * whether the process completed its task successful or not. |
330 | */ | 324 | */ |
331 | bool normalExit() const; | 325 | bool normalExit() const; |
332 | 326 | ||
333 | /** | 327 | /** |
334 | * Returns the exit status of the process. | 328 | * Returns the exit status of the process. |
335 | * | 329 | * |
336 | * Please use | 330 | * Please use |
337 | * @ref OProcess::normalExit() to check whether the process has exited | 331 | * @ref OProcess::normalExit() to check whether the process has exited |
338 | * cleanly (i.e., @ref OProcess::normalExit() returns @p true) before calling | 332 | * cleanly (i.e., @ref OProcess::normalExit() returns @p true) before calling |
339 | * this function because if the process did not exit normally, | 333 | * this function because if the process did not exit normally, |
340 | * it does not have a valid exit status. | 334 | * it does not have a valid exit status. |
341 | */ | 335 | */ |
342 | int exitStatus() const; | 336 | int exitStatus() const; |
343 | 337 | ||
344 | 338 | ||
345 | /** | 339 | /** |
346 | * Transmit data to the child process's stdin. | 340 | * Transmit data to the child process's stdin. |
347 | * | 341 | * |
348 | * OProcess::writeStdin may return false in the following cases: | 342 | * OProcess::writeStdin may return false in the following cases: |
349 | * | 343 | * |
350 | * @li The process is not currently running. | 344 | * @li The process is not currently running. |
351 | * | 345 | * |
352 | * @li Communication to stdin has not been requested in the @ref start() call. | 346 | * @li Communication to stdin has not been requested in the @ref start() call. |
353 | * | 347 | * |
354 | * @li Transmission of data to the child process by a previous call to | 348 | * @li Transmission of data to the child process by a previous call to |
355 | * @ref writeStdin() is still in progress. | 349 | * @ref writeStdin() is still in progress. |
356 | * | 350 | * |
357 | * Please note that the data is sent to the client asynchronously, | 351 | * Please note that the data is sent to the client asynchronously, |
358 | * so when this function returns, the data might not have been | 352 | * so when this function returns, the data might not have been |
359 | * processed by the child process. | 353 | * processed by the child process. |
360 | * | 354 | * |
361 | * If all the data has been sent to the client, the signal | 355 | * If all the data has been sent to the client, the signal |
362 | * @ref wroteStdin() will be emitted. | 356 | * @ref wroteStdin() will be emitted. |