aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-31 23:07:20 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-31 23:07:20 +0200
commit02a2c3560aa08c3c7f389706b0e24007e2010bc5 (patch)
treeb7be182bd1a5175148a0020866a4928a9b83af84
parent654da8a7a932e2652e5cf482373e62f1c70e56c9 (diff)
downloadgnunet-02a2c3560aa08c3c7f389706b0e24007e2010bc5.tar.gz
gnunet-02a2c3560aa08c3c7f389706b0e24007e2010bc5.zip
-indentation, better rvalues
-rw-r--r--src/util/os_priority.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index 08320b291..843b4734c 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -874,7 +874,7 @@ GNUNET_OS_start_process_s (enum GNUNET_OS_InheritStdioFlags std_inheritance,
874 * @param options WNOHANG if non-blocking is desired 874 * @param options WNOHANG if non-blocking is desired
875 * @return #GNUNET_OK on success, #GNUNET_NO if the process is still running, #GNUNET_SYSERR otherwise 875 * @return #GNUNET_OK on success, #GNUNET_NO if the process is still running, #GNUNET_SYSERR otherwise
876 */ 876 */
877static int 877static enum GNUNET_GenericReturnValue
878process_status (struct GNUNET_OS_Process *proc, 878process_status (struct GNUNET_OS_Process *proc,
879 enum GNUNET_OS_ProcessStatusType *type, 879 enum GNUNET_OS_ProcessStatusType *type,
880 unsigned long *code, 880 unsigned long *code,
@@ -884,10 +884,13 @@ process_status (struct GNUNET_OS_Process *proc,
884 int ret; 884 int ret;
885 885
886 GNUNET_assert (0 != proc); 886 GNUNET_assert (0 != proc);
887 ret = waitpid (proc->pid, &status, options); 887 ret = waitpid (proc->pid,
888 &status,
889 options);
888 if (ret < 0) 890 if (ret < 0)
889 { 891 {
890 LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "waitpid"); 892 LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING,
893 "waitpid");
891 return GNUNET_SYSERR; 894 return GNUNET_SYSERR;
892 } 895 }
893 if (0 == ret) 896 if (0 == ret)
@@ -898,7 +901,8 @@ process_status (struct GNUNET_OS_Process *proc,
898 } 901 }
899 if (proc->pid != ret) 902 if (proc->pid != ret)
900 { 903 {
901 LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING, "waitpid"); 904 LOG_STRERROR (GNUNET_ERROR_TYPE_WARNING,
905 "waitpid");
902 return GNUNET_SYSERR; 906 return GNUNET_SYSERR;
903 } 907 }
904 if (WIFEXITED (status)) 908 if (WIFEXITED (status))
@@ -942,7 +946,7 @@ process_status (struct GNUNET_OS_Process *proc,
942 * @param code return code/signal number 946 * @param code return code/signal number
943 * @return #GNUNET_OK on success, #GNUNET_NO if the process is still running, #GNUNET_SYSERR otherwise 947 * @return #GNUNET_OK on success, #GNUNET_NO if the process is still running, #GNUNET_SYSERR otherwise
944 */ 948 */
945int 949enum GNUNET_GenericReturnValue
946GNUNET_OS_process_status (struct GNUNET_OS_Process *proc, 950GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
947 enum GNUNET_OS_ProcessStatusType *type, 951 enum GNUNET_OS_ProcessStatusType *type,
948 unsigned long *code) 952 unsigned long *code)
@@ -960,7 +964,7 @@ GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
960 * @param code return code/signal number 964 * @param code return code/signal number
961 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 965 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
962 */ 966 */
963int 967enum GNUNET_GenericReturnValue
964GNUNET_OS_process_wait_status (struct GNUNET_OS_Process *proc, 968GNUNET_OS_process_wait_status (struct GNUNET_OS_Process *proc,
965 enum GNUNET_OS_ProcessStatusType *type, 969 enum GNUNET_OS_ProcessStatusType *type,
966 unsigned long *code) 970 unsigned long *code)