PreviousUpNext

14.4.100  Spawn__Premicrothread

The standard library Spawn__Premicrothread api defines access to functionality for conveniently firing up subprocesses. This functionality is built on top of Posixlib fork functionality; it encapsulates most of the work required to do a useful fork of a subprocess.

The Spawn__Premicrothread api is implemented by the spawn__premicrothread package.

The Spawn__Premicrothread api source code is in src/lib/std/src/posix/spawn–premicrothread.api.

See also: Posixlib.

See also: Spawn. The above information is manually maintained and may contain errors.

api {
    Process (X, Y, Z);
        Exit_Status
        = W_EXITED
        |
        W_EXITSTATUS
        one_byte_unt::Unt
        |
        W_SIGNALED
        interprocess_signals::Signal
        |
        W_STOPPED
        interprocess_signals::Signal;
        Spawn_Option
        = REDIRECT_STDERR_IN_CHILD
        Bool
        |
        REDIRECT_STDERR_TO_STDOUT_IN_CHILD
        Bool
        |
        REDIRECT_STDIN_IN_CHILD
        Bool
        |
        REDIRECT_STDOUT_IN_CHILD
        Bool
        |
        WITH_ENVIRONMENT
        List(String );
        spawn_process :
        {arguments:List(String ), executable:String, options:List(Spawn_Option )} -> Process((X, Y, Z));
    fork_process : List(Spawn_Option ) -> Null_Or(Process((X, Y, Z)) );
    bin_sh : String -> String;
    get_stdin_to_child_as_text_stream : Process((Output_Stream, X, Y)) -> Output_Stream;
        get_stdin_to_child_as_binary_stream :
            Process((winix_data_file_for_posix__premicrothread::Output_Stream, X, Y))
            ->
            winix_data_file_for_posix__premicrothread::Output_Stream;
    get_stdout_from_child_as_text_stream : Process((X, Input_Stream, Y)) -> Input_Stream;
        get_stdout_from_child_as_binary_stream :
            Process((X, winix_data_file_for_posix__premicrothread::Input_Stream, Y))
            ->
            winix_data_file_for_posix__premicrothread::Input_Stream;
    get_stderr_from_child_as_text_stream : Process((X, Y, Input_Stream)) -> Input_Stream;
        get_stderr_from_child_as_binary_stream :
            Process((X, Y, winix_data_file_for_posix__premicrothread::Input_Stream))
            ->
            winix_data_file_for_posix__premicrothread::Input_Stream;
    process_id_of : Process((X, Y, Z)) -> Int;
        text_streams_of :
            Process((Output_Stream, Input_Stream, Input_Stream))
            ->
            {stdin_to_child:Output_Stream, stdout_from_child:Input_Stream};
    reap : Process((X, Y, Z)) -> Int;
    kill : (Process((X, Y, Z)) , interprocess_signals::Signal) -> Void;
    exit : one_byte_unt::Unt -> X;};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext