Kaynağa Gözat

libdpkg: Split process waiting from subproc_wait_check into subproc_wait

Guillem Jover 16 yıl önce
ebeveyn
işleme
d538829679
2 değiştirilmiş dosya ile 12 ekleme ve 1 silme
  1. 11 1
      lib/dpkg/subproc.c
  2. 1 0
      lib/dpkg/subproc.h

+ 11 - 1
lib/dpkg/subproc.c

@@ -110,7 +110,7 @@ subproc_check(int status, const char *desc, int flags)
 }
 
 int
-subproc_wait_check(pid_t pid, const char *desc, int flags)
+subproc_wait(pid_t pid, const char *desc)
 {
 	pid_t r;
 	int status;
@@ -122,6 +122,16 @@ subproc_wait_check(pid_t pid, const char *desc, int flags)
 		ohshite(_("wait for %s failed"), desc);
 	}
 
+	return status;
+}
+
+int
+subproc_wait_check(pid_t pid, const char *desc, int flags)
+{
+	int status;
+
+	status = subproc_wait(pid, desc);
+
 	return subproc_check(status, desc, flags);
 }
 

+ 1 - 0
lib/dpkg/subproc.h

@@ -35,6 +35,7 @@ void subproc_signals_cleanup(int argc, void **argv);
 #define PROCWARN 2
 #define PROCNOERR 4
 
+int subproc_wait(pid_t pid, const char *desc);
 int subproc_check(int status, const char *desc, int flags);
 int subproc_wait_check(pid_t pid, const char *desc, int flags);