]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
add Process struct with spawn functions
authorJürg Billeter <j@bitron.ch>
Wed, 27 Sep 2006 08:57:30 +0000 (08:57 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Wed, 27 Sep 2006 08:57:30 +0000 (08:57 +0000)
2006-09-27  Jürg Billeter  <j@bitron.ch>

* vapi/glib-2.0.vala: add Process struct with spawn functions

svn path=/trunk/; revision=128

vala/ChangeLog
vala/vapi/glib-2.0.vala

index 817ed3d4942ebecb8347d31bff1d2a5804e657af..54d913e334d1ccfd5464b24a3c3ee5d50f4a438b 100644 (file)
@@ -1,3 +1,7 @@
+2006-09-27  Jürg Billeter  <j@bitron.ch>
+
+       * vapi/glib-2.0.vala: add Process struct with spawn functions
+
 2006-09-27  Jürg Billeter  <j@bitron.ch>
 
        * vapi/atk.vala, vapi/gdk-2.0.vala, vapi/gtk+-2.0.vala, vapi/pango.vala:
index ce89d2af414cb3cfb24574288aeddcce49a61cfb..fccb07be1c8054a326d6ae06c02b846d5b6ba541 100644 (file)
@@ -333,6 +333,9 @@ namespace GLib {
                public static uint add (SourceFunc function, pointer data);
        }
        
+       public struct Pid {
+       }
+       
        [ReferenceType (dup_function = "g_source_ref", free_function = "g_source_unref")]
        public struct Source {
                public construct (SourceFuncs source_funcs, uint struct_size);
@@ -430,10 +433,50 @@ namespace GLib {
        public struct Scanner {
        }
        
+       public enum SpawnError {
+               FORK,
+               READ,
+               CHDIR,
+               ACCES,
+               PERM,
+               TOOBIG,
+               NOEXEC,
+               NAMETOOLONG,
+               NOENT,
+               NOMEM,
+               NOTDIR,
+               LOOP,
+               TXTBUSY,
+               IO,
+               NFILE,
+               MFILE,
+               INVAL,
+               ISDIR,
+               LIBBAD,
+               FAILED
+       }
+       
+       [CCode (cprefix = "G_SPAWN_")]
        public enum SpawnFlags {
+               LEAVE_DESCRIPTOR_OPEN,
+               DO_NOT_REAP_CHILD,
+               SEARCH_PATH,
+               STDOUT_TO_DEV_NULL,
+               STDERR_TO_DEV_NULL,
+               CHILS_INHERITS_STDIN,
+               FILE_AND_ARGV_ZERO
        }
        
        public callback void SpawnChildSetupFunc (pointer user_data);
+       
+       public struct Process {
+               public static bool spawn_async_with_pipes (string working_directory, string[] argv, string[] envp, SpawnFlags _flags, SpawnChildSetupFunc child_setup, pointer user_data, Pid child_pid, ref int standard_input, ref int standard_output, ref int standard_error, out Error error);
+               public static bool spawn_async (string working_directory, string[] argv, string[] envp, SpawnFlags _flags, SpawnChildSetupFunc child_setup, pointer user_data, Pid child_pid, out Error error);
+               public static bool spawn_sync (string working_directory, string[] argv, string[] envp, SpawnFlags _flags, SpawnChildSetupFunc child_setup, pointer user_data, out string standard_output, out string standard_error, ref int exit_status, out Error error);
+               public static bool spawn_command_line_async (string! command_line, out Error error);
+               public static bool spawn_command_line_sync (string! command_line, out string standard_output, out string standard_error, ref int exit_status, out Error error);
+               public static void close_pid (Pid pid);
+       }
 
        public enum FileTest {
                IS_REGULAR,