23 lines
1.1 KiB
C
23 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* job_update_status.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2016/12/15 12:56:11 by jhalford #+# #+# */
|
|
/* Updated: 2017/03/03 18:37:10 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "job_control.h"
|
|
|
|
void job_update_status(void)
|
|
{
|
|
int status;
|
|
pid_t pid;
|
|
|
|
pid = waitpid(WAIT_ANY, &status, WUNTRACED | WNOHANG);
|
|
while (!mark_process_status(pid, status))
|
|
pid = waitpid(WAIT_ANY, &status, WUNTRACED | WNOHANG);
|
|
}
|