execve not working for files within APE zipfiles?

11 views
Skip to first unread message

Cefan Daniel Rubin

unread,
Nov 22, 2024, 12:15:13 PM11/22/24
to cosmopolitan cosmonauts
Howzits there cosmonauts!

It appears to me that the execve command cannot have been working for files within the containing APE zip.


      if (0 && _weaken(__zipos_parseuri) &&
          (_weaken(__zipos_parseuri)(prog, &uri) != -1)) {
...
      }

which renders the condition false (notice the 0 &&). Not sure how the corresponding tests still work. Was this intentional?

APE files could provide an interesting way to create portable multicall binaries composed of different commands. I want to put APE curl inside a modified APE QuickJS binary. But I think the above stands in the way of this kind of use.

Should I not be thinking of this sort of malarkey? Cheers all!

 - Cefan

Justine Tunney

unread,
Nov 22, 2024, 4:42:07 PM11/22/24
to Cefan Daniel Rubin, cosmopolitan cosmonauts
zipos execve() support was attempted in the past, but it's a really difficult problem, both to get stable and be async-signal-safe. Currently I don't have need of it. We aren't able to do it well yet, so we don't do it. Contributions are welcome to anyone qualified who wants to take it on.

--
You received this message because you are subscribed to the Google Groups "cosmopolitan cosmonauts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cosmopolitan-l...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cosmopolitan-libc/615c09ae-89b8-4800-87a0-bca07b937e2fn%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Cefan Daniel Rubin

unread,
Nov 22, 2024, 5:25:54 PM11/22/24
to cosmopolitan cosmonauts
Thank you for the explanation Justine and for your efforts! Happy weekend all.
Reply all
Reply to author
Forward
0 new messages