From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- 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