aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-05-07 01:20:48 +0200
committerChristian Grothoff <christian@grothoff.org>2023-05-07 01:20:54 +0200
commitcfdc99228ccdadc9392aaaf38661af931d6d5b6a (patch)
treebeb520c29c2b6b7b6211ed970c5a755e87c52fe2 /src/util
parent25fb12006dd655e31e345593ad5da2ef724b5c45 (diff)
downloadgnunet-cfdc99228ccdadc9392aaaf38661af931d6d5b6a.tar.gz
gnunet-cfdc99228ccdadc9392aaaf38661af931d6d5b6a.zip
-remove duplicate comments
Diffstat (limited to 'src/util')
-rw-r--r--src/util/os_priority.c80
1 files changed, 1 insertions, 79 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index 6f1c596c8..e82ff94b6 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -249,13 +249,6 @@ GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc,
249} 249}
250 250
251 251
252/**
253 * Get the pid of the process in question
254 *
255 * @param proc the process to get the pid of
256 *
257 * @return the current process id
258 */
259pid_t 252pid_t
260GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc) 253GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc)
261{ 254{
@@ -263,12 +256,6 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc)
263} 256}
264 257
265 258
266/**
267 * Cleans up process structure contents (OS-dependent) and deallocates
268 * it.
269 *
270 * @param proc pointer to process structure
271 */
272void 259void
273GNUNET_OS_process_destroy (struct GNUNET_OS_Process *proc) 260GNUNET_OS_process_destroy (struct GNUNET_OS_Process *proc)
274{ 261{
@@ -652,19 +639,6 @@ GNUNET_OS_start_process (enum GNUNET_OS_InheritStdioFlags std_inheritance,
652} 639}
653 640
654 641
655/**
656 * Start a process.
657 *
658 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags controlling which
659 * std handles of the parent are inherited by the child.
660 * pipe_stdin and pipe_stdout take priority over std_inheritance
661 * (when they are non-NULL).
662 * @param lsocks array of listen sockets to dup systemd-style (or NULL);
663 * must be NULL on platforms where dup is not supported
664 * @param filename name of the binary
665 * @param argv NULL-terminated list of arguments to the process
666 * @return process ID of the new process, -1 on error
667 */
668struct GNUNET_OS_Process * 642struct GNUNET_OS_Process *
669GNUNET_OS_start_process_v (enum GNUNET_OS_InheritStdioFlags std_inheritance, 643GNUNET_OS_start_process_v (enum GNUNET_OS_InheritStdioFlags std_inheritance,
670 const int *lsocks, 644 const int *lsocks,
@@ -681,23 +655,6 @@ GNUNET_OS_start_process_v (enum GNUNET_OS_InheritStdioFlags std_inheritance,
681} 655}
682 656
683 657
684/**
685 * Start a process. This function is similar to the GNUNET_OS_start_process_*
686 * except that the filename and arguments can have whole strings which contain
687 * the arguments. These arguments are to be separated by spaces and are parsed
688 * in the order they appear. Arguments containing spaces can be used by
689 * quoting them with @em ".
690 *
691 * @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
692 * @param lsocks array of listen sockets to dup systemd-style (or NULL);
693 * must be NULL on platforms where dup is not supported
694 * @param filename name of the binary. It is valid to have the arguments
695 * in this string when they are separated by spaces.
696 * @param ... more arguments. Should be of type `char *`. It is valid
697 * to have the arguments in these strings when they are separated by
698 * spaces. The last argument MUST be NULL.
699 * @return pointer to process structure of the new process, NULL on error
700 */
701struct GNUNET_OS_Process * 658struct GNUNET_OS_Process *
702GNUNET_OS_start_process_s (enum GNUNET_OS_InheritStdioFlags std_inheritance, 659GNUNET_OS_start_process_s (enum GNUNET_OS_InheritStdioFlags std_inheritance,
703 const int *lsocks, 660 const int *lsocks,
@@ -892,15 +849,6 @@ process_status (struct GNUNET_OS_Process *proc,
892} 849}
893 850
894 851
895/**
896 * Retrieve the status of a process.
897 * Nonblocking version.
898 *
899 * @param proc process ID
900 * @param type status type
901 * @param code return code/signal number
902 * @return #GNUNET_OK on success, #GNUNET_NO if the process is still running, #GNUNET_SYSERR otherwise
903 */
904enum GNUNET_GenericReturnValue 852enum GNUNET_GenericReturnValue
905GNUNET_OS_process_status (struct GNUNET_OS_Process *proc, 853GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
906 enum GNUNET_OS_ProcessStatusType *type, 854 enum GNUNET_OS_ProcessStatusType *type,
@@ -910,15 +858,6 @@ GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
910} 858}
911 859
912 860
913/**
914 * Retrieve the status of a process, waiting on it if dead.
915 * Blocking version.
916 *
917 * @param proc pointer to process structure
918 * @param type status type
919 * @param code return code/signal number
920 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
921 */
922enum GNUNET_GenericReturnValue 861enum GNUNET_GenericReturnValue
923GNUNET_OS_process_wait_status (struct GNUNET_OS_Process *proc, 862GNUNET_OS_process_wait_status (struct GNUNET_OS_Process *proc,
924 enum GNUNET_OS_ProcessStatusType *type, 863 enum GNUNET_OS_ProcessStatusType *type,
@@ -928,17 +867,7 @@ GNUNET_OS_process_wait_status (struct GNUNET_OS_Process *proc,
928} 867}
929 868
930 869
931/** 870enum GNUNET_GenericReturnValue
932 * Wait for a process to terminate. The return code is discarded.
933 * You must not use #GNUNET_OS_process_status() on the same process
934 * after calling this function! This function is blocking and should
935 * thus only be used if the child process is known to have terminated
936 * or to terminate very soon.
937 *
938 * @param proc pointer to process structure
939 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
940 */
941int
942GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc) 871GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc)
943{ 872{
944 pid_t pid = proc->pid; 873 pid_t pid = proc->pid;
@@ -1007,13 +936,6 @@ struct GNUNET_OS_CommandHandle
1007}; 936};
1008 937
1009 938
1010/**
1011 * Stop/kill a command. Must ONLY be called either from
1012 * the callback after 'NULL' was passed for 'line' *OR*
1013 * from an independent task (not within the line processor).
1014 *
1015 * @param cmd handle to the process
1016 */
1017void 939void
1018GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd) 940GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd)
1019{ 941{