On Thu, Aug 16, 2018 at 03:28:57PM +0200, butresin wrote: > There is a python script, what is using the /proc/ directory. > It is an extension to a program, OpenBSD/ports/productivity/taskwarrior. > OpenBSD does not deliver it, but one can easyli using it, copying to > ~/.task/hooks/ directory. > https://github.com/JensErat/task-relative-recur/on-modify.relative-recur > > I was using very heavily, on a system, with /proc directory, beacuse it is > very useful and productive. > The script one times was not working on OpenBSD, but was working 15 times. I > don't know why. > So I checked and see this in code: > > code: > # wait fot taskwarrior for finish > while (os.path.exists("/proc/%s" % str(task_pid))); > time.sleep(0.25) > code EOF > > The script first delete a task, waiting for finish, and after that create a > new task. > The waiting portion see in the above code snippet, fully at the link above. > On OpenBSD there is not /proc, so the script not sleep anything. > Should i worry? > > I searched www.openbsd.org/faq/ports end the ports@ mailing list, but not > found anything about /proc handling and python.
The loop will never work because the file doesn't exists. You could change the while loop to parse the output of "ps". -- Juan Francisco Cantero Hurtado http://juanfra.info