On Tue, Dec 22, 2015 at 5:24 PM, tesonep@gmail.com <tesonep@gmail.com> wrote:Hello Mariano,WNOHANG is a constant is defined in sys/wait.h, after the compilation is not included in the object file.You will have to duplicate its value in the Smalltalk Code. It's value is 1, in linux is defined in bits/waitflags.h as#define WNOHANG 1mmmmmm but then I would need to take care about its different values in different OS right?I am reading for example this thread: https://groups.google.com/forum/#!topic/comp.lang.python/_5rCpfYR_ZEsunos 4.1.3 : #define WNOHANG 1
Solaris 2.4 : #define WNOHANG 0100
OSF1 2.0 : #define WNOHANG 0x1
Ultrix 4.4 : #define WNOHANG 1
irix 4.0.5C : #define WNOHANG 0x1
irix 5.2 : #define WNOHANG 0100
irix 6.0.1 : #define WNOHANG 0100
OK..the thread is from 1995... I thought the POSIX standard would standardize that...I am now checking at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/sys/wait.hand it says:#define WNOHANG 0x00000001
But again..I wonder how portable is to stick to that...Ok...maybe I will need to go with a VM primitive as #primGetChildExitStatus: that way I can do the:self cCode: 'waitpid ( pidToHandle, &exitStatus, WNOHANG )' inSmalltalk: [ exitStatus := -1 ].pd: que groso Pablito verte por aca!!!!Cheers,PabloOn Tue, Dec 22, 2015 at 5:12 PM, Mariano Martinez Peck <marianopeck@gmail.com> wrote:Hi guys,Say I want to call to waitpid like this:waitpid(childID, &status, WNOHANG);How can I do since I don't have access to WNOHANG int value in order to send it via argument .... ???Any idea?Thanks in advance,Pablo Tesone.
tesonep@gmail.com