On Monday 17 April 2017 01:04 PM, Luke Gorrie wrote:

I wonder if some DWIM would make sense here. For example, my bash
wrapper that starts the VM could inspect the image file and decide which
VM is appropriate (spur, non-spur, 32-it, 64-bit, etc.) Otherwise the
user needs to guess and decipher cryptic error messages.

You can use the attached magic file with file(1) command:

 file -m magic <image files> ...

to detect the image type. or register the patterns with binfmt_misc to match the vm to the image type automatically.

BTW, I goofed in my earlier email. I was using 64/vm60 and not 64/vmT60. Sorry for the confusion. With 64/vmT60, I use the following :

$ sudo prlimit --rtprio=2 --pid $$
$ ./pharo Pharo.image eval 3+4

Regards .. Subbu
# Smalltalk image file formats
0       lelong  6502    Smalltalk image V3 32b  (%d)
!:mime application/squeak-image
0       belong  6502    Smalltalk image V3 32b  (%d)
!:mime application/squeak-image
0       lelong  6504    Smalltalk image V3 32b +C (%d)
!:mime application/cog-image
0       belong  6504    Smalltalk image V3 32b +C (%d)
!:mime application/cog-image
0       lelong  68000   Smalltalk image V3 64b  (%d)
!:mime application/squeak64-image
4       belong  68000   Smalltalk image V3 64b  (%d)
!:mime application/squeak64-image
0       lelong  68002   Smalltalk image V3 64b +C (%d)
!:mime application/cog64-image
4       belong  68002   Smalltalk image V3 64b +C (%d)
!:mime application/cog64-image
0       lelong  6505    Smalltalk image V3 32b +C+NF (%d)
!:mime application/cog-image
0       belong  6505    Smalltalk image V3 32b +C+NF (%d)
!:mime application/cog-image
0       lelong  68003   Smalltalk image V3 64b +C+NF (%d)
!:mime application/cog64-image
4       belong  68003   Smalltalk image V3 64b +C+NF (%d)
!:mime application/cog64-image
0       lelong  6521    Smalltalk image Spur 32b +C+NF (%d)
!:mime application/spur-image
0       belong  6521    Smalltalk image Spur 32b +C+NF (%d)
!:mime application/spur-image
0       lelong  68019   Smalltalk image Spur 64b +C+NF (%d)
!:mime application/spur64-image
4       belong  68019   Smalltalk image Spur 64b +C+NF (%d)
!:mime application/spur64-image
0       lelong  68021   Smalltalk image Spur 64b +C+NF+Tag (%d)
!:mime application/spur64-image
4       belong  68021   Smalltalk image Spur 64b +C+NF+Tag (%d)
!:mime application/spur64-image

Reply via email to