PreviousUpNext

14.3.7  Posix_Process

The standard library Posix_Process api is a sub-API of the Posix_1003_1b API.

The above information is manually maintained and may contain errors.

api {    eqtype Signal ;
    eqtype Process_Id ;
    unt_to_pid : one_word_unt::Unt -> Process_Id;
    pid_to_unt : Process_Id -> one_word_unt::Unt;
    fork : Void -> Null_Or(Process_Id );
    exec : (String , List(String )) -> X;
    exece : (String , List(String ) , List(String )) -> X;
    execp : (String , List(String )) -> X;
    Waitpid_Arg 
      = W_ANY_CHILD
      | W_CHILD Process_Id
      | W_GROUP Process_Id
      | W_SAME_GROUP;
    Exit_Status 
      = W_EXITED
      | W_EXITSTATUS one_byte_unt::Unt
      | W_SIGNALED Signal
      | W_STOPPED Signal;
    from_status : Int -> Exit_Status;
    package w : api {
                    eqtype Flags ;
                    to_unt : Flags -> one_word_unt::Unt;
                    from_unt : one_word_unt::Unt -> Flags;
                    all : Flags;
                    flags : List(Flags ) -> Flags;
                    intersect : List(Flags ) -> Flags;
                    clear : (Flags , Flags) -> Flags;
                    all_set : (Flags , Flags) -> Bool;
                    any_set : (Flags , Flags) -> Bool;
                    untraced : Flags;
                };;
    wait : Void -> (Process_Id , Exit_Status);
    waitpid : (Waitpid_Arg , List(w::Flags ))
              -> (Process_Id , Exit_Status);
    waitpid_nh : (Waitpid_Arg , List(w::Flags ))
                 -> Null_Or(((Process_Id , Exit_Status)) );
    exit : one_byte_unt::Unt -> X;
    Killpid_Arg 
      = K_GROUP Process_Id | K_PROC Process_Id | K_SAME_GROUP;
    kill : (Killpid_Arg , Signal) -> Void;
    alarm : time::Time -> time::Time;
    pause : Void -> Void;
    sleep : time::Time -> time::Time;
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext