Commit d901e9b2 authored by Adriaan de Groot's avatar Adriaan de Groot 💬 Committed by Kurt Hindenburg
Browse files

Expand documentation of isForegroundProcessActive()

- add examples
- note that no-process-is-running returns false
parent c2a0e4cf
Pipeline #92318 passed with stage
in 1 minute and 52 seconds
......@@ -309,7 +309,19 @@ public:
/** See setAutoClose() */
bool autoClose() const;
/** Returns true if the user has started a program in the session. */
/**
* Returns true if the user has started a program in the session.
* Examples of what counts as a "program" are:
* - `vim` (interactive, blocks the shell)
* - `find /` (non-interactive, potentially long-running, blocks the shell)
* - a sub-shell started by hand (e.g. running `/bin/bash` from the shell in the session)
* **Non** examples are:
* - the shell started by the session (e.g. `/bin/bash`)
* - backgrounded processes (e.g. `find / &`)
*
* If all processes in the session have exited already, returns false.
*
*/
bool isForegroundProcessActive();
/** Returns the name of the current foreground process. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment