summaryrefslogtreecommitdiff
path: root/lib/astal/io/process.vala
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-12-19 21:32:48 +0100
committerAylur <[email protected]>2024-12-19 21:32:48 +0100
commit61637d6333bd812021763039ceea61e7f7d29dbf (patch)
treebebdc24df1d5d0a9c7bf2c2f98376c1be341ee80 /lib/astal/io/process.vala
parent64150c7739049e3cc9b6b931eba58a635cbc24df (diff)
parentc12fb05408c1cd1b1bca545fec636abda52f6755 (diff)
Merge branch 'main' into feat/tray-gtk4
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);
}
/**