lxi-tools / liblxi

Open source LXI library
https://lxi-tools.github.io
Other
103 stars 27 forks source link

vxi11: Drop non-portable pthread timeout call; solves #30 #31

Closed kallisti5 closed 2 years ago

kallisti5 commented 2 years ago
kallisti5 commented 2 years ago

After change:

Powered on:

$ gcc -I../src/ -L../build/src/ -llxi -ltirpc scpi.c -o search && ./search
RIGOL TECHNOLOGIES,DS1104Z,DS1ZA19090XXXX,00.04.05.SP2

Powered on:

$ gcc -I../src/ -L../build/src/ -llxi -ltirpc scpi.c -o scpi && ./scpi
RIGOL TECHNOLOGIES,DS1104Z,DS1ZA19090XXXX,00.04.05.SP2
$ echo $?
0

Powered off:

$ gcc -I../src/ -L../build/src/ -llxi -ltirpc scpi.c -o scpi && ./scpi

$ echo $?
0

~Hm. The timeout fires... but it's detected as a success. I might have a bug in this PR~

Actually, this is the same behavior as the existing code. This one should be good to go.