<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Mariano,</div><div><br>On Dec 22, 2015, at 8:36 PM, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 22, 2015 at 5:24 PM, <a href="mailto:tesonep@gmail.com" target="_blank">tesonep@gmail.com</a> <span dir="ltr">&lt;<a href="mailto:tesonep@gmail.com" target="_blank">tesonep@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hello Mariano,&nbsp;<div>&nbsp; &nbsp; &nbsp;<span style="font-size:12.8px">WNOHANG is a constant is defined in sys/wait.h, after the compilation is not included in the object file.&nbsp;</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">You will have to duplicate its value in the Smalltalk Code. It's value is 1, in linux is defined in&nbsp;bits/waitflags.h as&nbsp;</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">#define<span style="white-space:pre-wrap">        </span>WNOHANG<span style="white-space:pre-wrap">                </span>1<span style="white-space:pre-wrap">        </span></span><br></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap"><br></span></span></div></div></blockquote><div><br></div><div>mmmmmm but then I would need to take care about its different values in different OS right?&nbsp;</div><div>I am reading for example this thread:&nbsp;<a href="https://groups.google.com/forum/#!topic/comp.lang.python/_5rCpfYR_ZE" target="_blank">https://groups.google.com/forum/#!topic/comp.lang.python/_5rCpfYR_ZE</a></div><div><br></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">&nbsp; &nbsp; &nbsp;sunos 4.1.3 &nbsp; &nbsp; : #define WNOHANG 1</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Solaris 2.4 &nbsp; &nbsp; : #define WNOHANG 0100</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OSF1 2.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: #define WNOHANG 0x1</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ultrix 4.4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: #define WNOHANG 1</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;irix 4.0.5C &nbsp; &nbsp; : #define WNOHANG 0x1</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;irix 5.2 &nbsp; &nbsp; &nbsp; &nbsp;: #define WNOHANG 0100</span><br style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;irix 6.0.1 &nbsp; &nbsp; &nbsp;: #define WNOHANG 0100</span><br></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></span></div></div></div></div></div></blockquote><div><br></div>Exactly. &nbsp;I've discussed this before. &nbsp;Please read<div><br></div><div><a href="http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2012-May/064382.html">http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/2012-May/064382.html</a></div><div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">OK..the thread is from 1995... I thought the POSIX standard would standardize that...</span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">I am now checking at&nbsp;</span><font face="Arial, Helvetica, sans-serif">/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/wait.h</font></div><div><br></div><div><font face="Arial, Helvetica, sans-serif">and it says:</font></div><div>







<p class=""><span class="">#define WNOHANG<span class="">        </span><span class="">        </span></span><span class="">0x00000001</span></p></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">But again..I wonder how portable is to stick to that...&nbsp;</span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px">Ok...maybe I will need to go with a VM primitive as #</span><font face="Arial, Helvetica, sans-serif">primGetChildExitStatus: &nbsp; that way I can do the:</font></div><div><font face="Arial, Helvetica, sans-serif"><br></font></div><div><font face="Arial, Helvetica, sans-serif"><div>self cCode: 'waitpid ( pidToHandle, &amp;exitStatus, WNOHANG )'<span style="white-space:pre">&nbsp; </span>inSmalltalk: [ exitStatus := -1 ].</div></font></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:Arial,Helvetica,sans-serif;font-size:13px"><br></span></div><div><font face="Arial, Helvetica, sans-serif">pd: que groso Pablito verte por aca!!!!</font></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span style="font-size:12.8px"><span style="white-space:pre-wrap"></span></span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">Cheers, </span></span></div><div><span style="font-size:12.8px"><span style="white-space:pre-wrap">Pablo</span></span></div></div><div class="gmail_extra"><div><br><div class="gmail_quote">On Tue, Dec 22, 2015 at 5:12 PM, Mariano Martinez Peck <span dir="ltr">&lt;<a href="mailto:marianopeck@gmail.com" target="_blank">marianopeck@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi guys,<div><br></div><div>Say I want to call to waitpid like this:</div><div><br></div><div>waitpid(childID, &amp;status, WNOHANG);<br></div><div><div><br></div><div>How can I do since I don't have access to WNOHANG int value in order to send it via argument .... ???</div><div><br></div><div>Any idea?</div><div><br></div><div>Thanks in advance,&nbsp;</div><span><font color="#888888"><div><br></div><div>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br></div>
</font></span></div></div>
</blockquote></div><br></div><span><font color="#888888"><div>Pablo Tesone.<br><a href="mailto:tesonep@gmail.com" target="_blank">tesonep@gmail.com</a></div>
</font></span></div>
</blockquote></div><br><div>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a></div></div></div></blockquote></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br>_,,,^..^,,,_ (phone)</span></div></body></html>