Fixed g_waitpid function

Fixed g_waitpid function
This commit is contained in:
zbstao
2022-02-15 22:32:46 +08:00
parent f8f18e27c5
commit 1309ea405e
+1 -9
View File
@@ -2973,7 +2973,7 @@ g_waitchild(void)
/*****************************************************************************/
/* does not work in win32
returns pid of process that exits or zero if signal occurred */
returns pid of process that exits or <= 0 if no process was found */
int
g_waitpid(int pid)
{
@@ -2989,14 +2989,6 @@ g_waitpid(int pid)
else
{
rv = waitpid(pid, 0, 0);
if (rv == -1)
{
if (errno == EINTR) /* signal occurred */
{
rv = 0;
}
}
}
return rv;