<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hello Hannes,</p>
<p>Try this:</p>
<p>child := OSProcess command: 'ps'.<br />child printString. "==> 'an ExternalUnixOSProcess with pid 42622 on /bin/sh (complete, normal termination with status 0)' "<br />child isComplete. "==> true"</p>
<p>When using OSProcess like this, you are creating a child unix process that runs the /bin/sh executable program, which is a unix shell that then runs the /usr/bin/ps program (or whatever other program you want to run). From the Cuis image, the /bin/sh program is the child of your VM image, and the /usr/bin/ps program is the child of the /bin/sh program. From Cuis, you can see the run status (and exit status) of the /bin/sh program, although you cannot directly see the results of the program that the shell was running. Although limited, this should be enough information to tell you if your program has run to completion.</p>
<p>Better handling of child processes, pipes, exit status and so forth is provided by the CommandShell package, which is designed to work with OSProcess. However, CommandShell is not yet available for Cuis. Nevertheless, the simple OSProcess class>>command: implementation is sufficient for many things.</p>
<p>HTH,</p>
<p>Dave</p>
<div id="signature"></div>
<p><br /></p>
<p id="reply-intro">On 2025-03-10 21:15, H. Hirzel via Cuis-dev wrote:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<div id="replybody1">
<p>Hi</p>
<p>I want to use OSProcess to do file conversions with pandoc *</p>
<p>OSProcess command: 'pandoc --from=Markdown --to=DocBook C:\Users\Hirzel\Documents\Cuis-Smalltalk-7061-UserFiles\manual.txt --output=C:\Users\Hirzel\Documents\manual.xml' </p>
<p>The conversion process runs in a separate thread. How can I determine if the thread has terminated e.g. to start processing manual.xml.</p>
<p>I do not necessarily mind if the UI is blocked.</p>
<p>Regards</p>
<p>Hannes</p>
<p>------------------------------</p>
<p>* <a class="v1moz-txt-link-freetext" href="https://pandoc.org/" target="_blank" rel="noopener noreferrer">https://pandoc.org/</a></p>
<p><span class="v1small">a universal document converter, e.g. from Markdown to Docbook, docx, html etc.<br /></span></p>
<p><br /></p>
<p><br /></p>
</div>
<br />
<div class="pre" style="margin: 0; padding: 0; font-family: monospace"> </div>
</blockquote>
</body></html>