summaryrefslogtreecommitdiff
path: root/lib/astal/io/process.vala
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-12-19 23:44:18 +0100
committerGitHub <[email protected]>2024-12-19 23:44:18 +0100
commitc34349ca44c4e43bf2c58b3e2e4f1f9e39358b53 (patch)
tree604bdece8e3fe3bd2a286ab1e8ef07dd8d90c37c /lib/astal/io/process.vala
parent4f47b69946dd7127ba66e6333af4945afaba15de (diff)
parentc5664e2941b33609de0743a8475a40b24522a3dc (diff)
Merge pull request #68 from Aylur/feat/tray-gtk4
tray: gtk4 compatibility
Diffstat (limited to 'lib/astal/io/process.vala')
-rw-r--r--lib/astal/io/process.vala13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/astal/io/process.vala b/lib/astal/io/process.vala
index cfd05b9..4b77aee 100644
--- a/lib/astal/io/process.vala
+++ b/lib/astal/io/process.vala
@@ -76,7 +76,7 @@ public class AstalIO.Process : Object {
*
* The first element of the vector is executed with the remaining elements as the argument list.
*/
- public Process.subprocessv(string[] cmd) throws Error {
+ public Process(string[] cmd) throws Error {
Object(argv: cmd);
process = new Subprocess.newv(cmd,
SubprocessFlags.STDIN_PIPE |
@@ -91,13 +91,22 @@ public class AstalIO.Process : Object {
}
/**
+ * Start a new subprocess with the given command.
+ *
+ * The first element of the vector is executed with the remaining elements as the argument list.
+ */
+ public static Process subprocessv(string[] cmd) throws Error {
+ return new Process(cmd);
+ }
+
+ /**
* Start a new subprocess with the given command
* which is parsed using [[email protected]_parse_argv].
*/
public static Process subprocess(string cmd) throws Error {
string[] argv;
Shell.parse_argv(cmd, out argv);
- return new Process.subprocessv(argv);
+ return Process.subprocessv(argv);
}
/**