IRC channel logs

2022-12-15.log

back to list of logs

<stikonas>was looking at UEFI variables for environment variables a bit. Reading and writing them is not too problematic, should be doable inside M2libc.
<stikonas>though they might be far more persistent than on POSIX...
<stikonas>on POSIX environmental variables wouldn't propagate from child to parent
<stikonas>but if we use UEFI variables (at least in a simple way) then environmental variables might propagate to sibling processes
<stikonas>parent probably wouldn't be affected as uefi variables are read on process startup
<stikonas>but any children launched later could inhering whatever 1st child set
<stikonas>which is a bit undesirable, though possibly not a huge problem in practice
<stikonas>perhaps we can clean up on program exit...
<oriansj>stikonas: or do a full env reset
<oriansj>then the only environment variables will be the one's kaem sets prior to spawning.
<oriansj>but we still have the problem of if MesCC can even run on UEFI
<stikonas[m]>I think I'll just make a copy of env list on startup
<stikonas[m]>Keep modifying one and then on cleanup delete all variables that are not on backed up list
<stikonas[m]>(And restore the values of remaining ones)
<stikonas[m]>No idea about mescc
<stikonas[m]>Even mes-m2 is tricky
<stikonas[m]>Unless we extend M2libc
<stikonas[m]>Well, most likely if mes-m2 works, mescc will work
<stikonas[m]>But mes rebuild and also tcc is trickier
<stikonas[m]>As those use mes c library