extern "C" {
#endif
-#ifndef _di_f_process_descriptor_clone_
+#if !defined(_di_f_process_descriptor_clone_) && defined(_en_use_syscall_pidfd_getfd_) && !defined(SYS_pidfd_getfd)
+ f_status_t f_process_descriptor_clone(const pid_t pid, const int clone, const unsigned int flags, int * const id) {
+ return F_status_set_error(F_implement_not);
+ }
+#elif !defined(_di_f_process_descriptor_clone_)
f_status_t f_process_descriptor_clone(const pid_t pid, const int clone, const unsigned int flags, int * const id) {
#ifndef _di_level_0_parameter_checking_
if (!id) return F_status_set_error(F_parameter);
return F_okay;
}
-#endif // _di_f_process_descriptor_clone_
+#endif // !defined(_di_f_process_descriptor_clone_) && defined(_en_use_syscall_pidfd_getfd_) && !defined(SYS_pidfd_getfd)
-#ifndef _di_f_process_descriptor_open_
+#if !defined(_di_f_process_descriptor_open_) && defined(_en_use_syscall_pidfd_getfd_) && !defined(SYS_pidfd_open)
+ f_status_t f_process_descriptor_open(const pid_t pid, const unsigned int flags, int * const id) {
+ return F_status_set_error(F_implement_not);
+ }
+#elif !defined(_di_f_process_descriptor_open_)
f_status_t f_process_descriptor_open(const pid_t pid, const unsigned int flags, int * const id) {
#ifndef _di_level_0_parameter_checking_
if (!id) return F_status_set_error(F_parameter);
return F_okay;
}
-#endif // _di_f_process_descriptor_open_
+#endif // !defined(_di_f_process_descriptor_open_) && defined(_en_use_syscall_pidfd_getfd_) && !defined(SYS_pidfd_open)
-#ifndef _di_f_process_descriptor_signal_
+#if !defined(_di_f_process_descriptor_signal_) && defined(_en_use_syscall_pidfd_getfd_) && !defined(SYS_pidfd_send_signal)
+ f_status_t f_process_descriptor_signal(const int id, const int signal, const unsigned int flags, siginfo_t * const information) {
+ return F_status_set_error(F_implement_not);
+ }
+#elif !defined(_di_f_process_descriptor_signal_)
f_status_t f_process_descriptor_signal(const int id, const int signal, const unsigned int flags, siginfo_t * const information) {
#ifdef _en_use_syscall_pidfd_send_signal_
return F_okay;
}
-#endif // _di_f_process_descriptor_signal_
+#endif // !defined(_di_f_process_descriptor_signal_) && defined(_en_use_syscall_pidfd_getfd_) && !defined(SYS_pidfd_send_signal)
#ifndef _di_f_process_handle_from_path_at_
f_status_t f_process_handle_from_path_at(const int at_id, const f_string_static_t path, const int flags, f_handle_t * const handle, int * const id) {
* F_file_descriptor_max (with error bit) if max file descriptors is reached.
* F_file_descriptor_not (with error bit) if the file descriptor is invalid.
* F_file_open_max (with error bit) when system-wide max open files is reached.
+ * F_implement_not (with error bit) if this function is not available (such as the syscall not being available).
* F_parameter (with error bit) if a parameter is invalid.
* F_prohibited (with error bit) if the current process is not allowed to clone the requested file descriptor.
* F_search (with error bit) if the process could not be found.
* F_device_not (with error bit) if the device does not exist.
* F_file_descriptor_max (with error bit) if max file descriptors is reached.
* F_file_open_max (with error bit) when system-wide max open files is reached.
+ * F_implement_not (with error bit) if this function is not available (such as the syscall not being available).
* F_memory_not (with error bit) if out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_search (with error bit) if the process could not be found.
* F_okay on success.
*
* F_file_descriptor_not (with error bit) if the file descriptor is invalid.
+ * F_implement_not (with error bit) if this function is not available (such as the syscall not being available).
* F_parameter (with error bit) if a parameter is invalid.
* F_prohibited (with error bit) if the current process is not allowed to signal the requested file descriptor.
* F_search (with error bit) if the process could not be found.