#include #include module Bindings.APR.Thread.Proc where #strict_import import Bindings.APR import Bindings.APR.ErrNo import Bindings.APR.File.Types import Bindings.APR.Pools import System.Posix.Types #integral_t apr_cmdtype_e #num APR_SHELLCMD #num APR_PROGRAM #num APR_PROGRAM_ENV #num APR_PROGRAM_PATH #num APR_SHELLCMD_ENV #integral_t apr_wait_how_e #num APR_WAIT #num APR_NOWAIT #integral_t apr_exit_why_e #num APR_PROC_EXIT #num APR_PROC_SIGNAL #num APR_PROC_SIGNAL_CORE #cinline APR_PROC_CHECK_EXIT , Ptr -> IO CInt #cinline APR_PROC_CHECK_SIGNALED , Ptr -> IO CInt #cinline APR_PROC_CHECK_CORE_DUMP, Ptr -> IO CInt #num APR_NO_PIPE #num APR_FULL_BLOCK #num APR_FULL_NONBLOCK #num APR_PARENT_BLOCK #num APR_CHILD_BLOCK #num APR_NO_FILE #num APR_READ_BLOCK #num APR_WRITE_BLOCK #num APR_LIMIT_CPU #num APR_LIMIT_MEM #num APR_LIMIT_NPROC #num APR_LIMIT_NOFILE #num APR_OC_REASON_DEATH #num APR_OC_REASON_UNWRITABLE #num APR_OC_REASON_RESTART #num APR_OC_REASON_UNREGISTER #num APR_OC_REASON_LOST #num APR_OC_REASON_RUNNING #starttype struct apr_proc_t # field pid, CPid # field in , Ptr # field out, Ptr # field err, Ptr # if APR_HAS_PROC_INVOKED # field invoked, Ptr CCHar # endif #stoptype #callback apr_child_errfn_t, Ptr -> -> Ptr CChar -> IO () #opaque_t apr_thread_t #opaque_t apr_threadattr_t #opaque_t apr_procattr_t #opaque_t apr_thread_once_t #opaque_t apr_threadkey_t #opaque_t apr_other_child_rec_t #callback apr_thread_start_t, Ptr -> Ptr () -> IO (Ptr ()) #integral_t apr_kill_conditions_e #num APR_KILL_NEVER #num APR_KILL_ALWAYS #num APR_KILL_AFTER_TIMEOUT #num APR_JUST_WAIT #num APR_KILL_ONLY_ONCE #if APR_HAS_THREADS # ccall apr_threadattr_create , Ptr (Ptr ) -> Ptr -> IO # ccall apr_threadattr_detach_set , Ptr -> -> IO # ccall apr_threadattr_detach_get , Ptr -> IO # ccall apr_threadattr_stacksize_set, Ptr -> -> IO # ccall apr_threadattr_guardsize_set, Ptr -> -> IO # ccall apr_thread_create , Ptr (Ptr ) -> Ptr -> -> Ptr () -> Ptr -> IO # ccall apr_thread_exit , Ptr -> -> IO # ccall apr_thread_join , Ptr -> Ptr -> IO # ccall apr_thread_yield , IO () # ccall apr_thread_once_init, Ptr (Ptr ) -> Ptr -> IO # ccall apr_thread_once , Ptr -> FunPtr (IO ()) -> IO # ccall apr_thread_detach , Ptr -> IO # ccall apr_thread_data_get , Ptr (Ptr ()) -> Ptr CChar -> Ptr -> IO # ccall apr_thread_data_set , Ptr () -> Ptr CChar -> FunPtr (Ptr () -> IO ) -> Ptr -> IO # ccall apr_threadkey_private_create, Ptr (Ptr ) -> FunPtr (Ptr () -> IO ()) -> Ptr -> IO # ccall apr_threadkey_private_get , Ptr (Ptr ()) -> Ptr -> IO # ccall apr_threadkey_private_set , Ptr () -> Ptr -> IO # ccall apr_threadkey_private_delete, Ptr -> Ptr # ccall apr_threadkey_data_get, Ptr (Ptr ()) -> Ptr CChar -> Ptr -> IO # ccall apr_threadkey_data_set, Ptr () -> Ptr CChar -> FunPtr (Ptr () -> IO ) -> Ptr -> IO #endif #ccall apr_procattr_create , Ptr (Ptr ) -> Ptr -> IO #ccall apr_procattr_io_set , Ptr -> -> -> -> IO #ccall apr_procattr_child_in_set , Ptr -> Ptr -> Ptr -> IO #ccall apr_procattr_child_out_set, Ptr -> Ptr -> Ptr -> IO #ccall apr_procattr_child_err_set, Ptr -> Ptr -> Ptr -> IO #ccall apr_procattr_dir_set , Ptr -> Ptr CChar -> IO #ccall apr_procattr_cmdtype_set , Ptr -> -> IO #ccall apr_procattr_detach_set , Ptr -> -> IO #if APR_HAVE_STRUCT_RLIMIT -- FIXME: rlimit -- # ccall apr_procattr_limit_set , Ptr -> -> Ptr -> IO #endif #ccall apr_procattr_child_errfn_set, Ptr -> -> IO #ccall apr_procattr_error_check_set, Ptr -> -> IO #ccall apr_procattr_addrspace_set , Ptr -> -> IO #ccall apr_procattr_user_set , Ptr -> Ptr CChar -> Ptr CChar -> IO #ccall apr_procattr_group_set , Ptr -> Ptr CChar -> Ptr #if APR_HAS_FORK # ccall apr_proc_fork, Ptr -> Ptr -> IO #endif #ccall apr_proc_create , Ptr -> Ptr CChar -> Ptr (Ptr CChar) -> Ptr (Ptr CChar) -> Ptr -> Ptr -> IO #ccall apr_proc_wait , Ptr -> Ptr CInt -> Ptr -> -> IO #ccall apr_proc_wait_all_procs, Ptr -> Ptr CInt -> Ptr -> -> Ptr -> IO #num APR_PROC_DETACH_FOREGROUND #num APR_PROC_DETACH_DAEMONIZE #ccall apr_proc_detach , CInt -> IO #ccall apr_proc_other_child_register , Ptr -> FunPtr (CInt -> Ptr () -> CInt -> IO ()) -> Ptr () -> Ptr -> Ptr -> IO () #ccall apr_proc_other_child_unregister , Ptr () -> IO () #ccall apr_proc_other_child_alert , Ptr -> CInt -> CInt -> IO #ccall apr_proc_other_child_refresh , Ptr -> CInt -> IO () #ccall apr_proc_other_child_refresh_all, CInt -> IO () #ccall apr_proc_kill , Ptr -> CInt -> IO #ccall apr_pool_note_subprocess , Ptr -> Ptr -> -> IO () #if APR_HAS_THREADS # if (APR_HAVE_SIGWAIT || APR_HAVE_SIGSUSPEND) && !defined(OS2) # ccall apr_setup_signal_thread, IO # ccall apr_signal_thread , FunPtr (CInt -> IO CInt) -> IO # endif # ccall apr_thread_pool_get, Ptr -> IO (Ptr ) #endif