GhostManSec
Server: Apache
System: Linux s323.xrea.com 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: moonarc (17751)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //usr/local/fehQlibs-23/wait.c
#include <sys/types.h>
#include <sys/wait.h>
#include "logmsg.h"

/**
	@file wait.c
	@author djb
	@source qmail
	@brief wait for forked processes
*/

int wait_nohang(int *wstat)
{
  return waitpid(-1,wstat,WNOHANG);
}

int wait_pid(int *wstat,int pid)
{
  int r;

  do
    r = waitpid(pid,wstat,0);
  while ((r == -1) && (errno == EINTR));
  return r;
}