Re: [fpc-pascal] FpWaitPid() multiplies status by 256

2018-10-07 Thread Anton Shepelev
Marco van de Voort to Anton Shepelev: > > may return the status multiplied by 256? If my child > > process terminates with Halt(1), the status is 256, if > > with Halt(2), the status is 512, etc. > > Entirely normal. Status is an opague format in POSIX, and > there are macros to pry them

Re: [fpc-pascal] FpWaitPid() multiplies status by 256

2018-10-06 Thread Marco van de Voort
In our previous episode, Anton Shepelev said: > may return the status multiplied by 256? If my child pro- > cess terminates with Halt(1), the status is 256, if with > Halt(2), the status is 512, etc. Entirely normal. Status is an opague format in POSIX, and there are macros to pry them

[fpc-pascal] FpWaitPid() multiplies status by 256

2018-10-06 Thread Anton Shepelev
Hello, all Can anybody suggest why the function function FpWaitPid ( pid: TPid; var Status: cint; Options: cint ): TPid; may return the status multiplied by 256? If my child pro- cess terminates with Halt(1), the status is 256, if with Halt(2),