From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/etc/prdone.x | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 sys/etc/prdone.x (limited to 'sys/etc/prdone.x') diff --git a/sys/etc/prdone.x b/sys/etc/prdone.x new file mode 100644 index 00000000..2df2dccc --- /dev/null +++ b/sys/etc/prdone.x @@ -0,0 +1,26 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include + +# PRDONE -- Determine if a detached process (background job) has completed. +# This is a difficult process to perform portably at the system call level, +# hence the deletion of the bkgfile is used to signal the completion of a +# detached process. If the detached process fails to delete its bkgfile +# for some reason, PRCLDPR will do so if the process has indeed terminated. + +int procedure prdone (job) + +int job # job number (slot number in job table) +int access() +include "prd.com" + +begin + if (pr_jobcode[job] == NULL) + call syserr (SYS_PRBKGNF) + + if (access (Memc[pr_bkgfile[job]], 0, 0) == YES) + return (NO) + else + return (YES) +end -- cgit