mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-08 10:50:28 +00:00
Move GetHostIps before processing command line options
This allows using unix.pledge as part of the options without affecting retrieving host IP addresses (which requires `connect`). It may still fail under external `pledge` command as expected; in this case IPs would need to be passed manually.
This commit is contained in:
parent
d21ac5838c
commit
da0b25500c
1 changed files with 2 additions and 2 deletions
|
@ -7401,12 +7401,12 @@ void RedBean(int argc, char *argv[]) {
|
|||
CHECK_NE(-1, fstat(zfd, &zst));
|
||||
OpenZip(true);
|
||||
SetDefaults();
|
||||
LuaStart();
|
||||
GetOpts(argc, argv);
|
||||
// this can fail with EPERM if we're running under pledge()
|
||||
if (!interpretermode && !(interfaces = GetHostIps())) {
|
||||
WARNF("(srvr) failed to query system network interface addresses: %m");
|
||||
}
|
||||
LuaStart();
|
||||
GetOpts(argc, argv);
|
||||
#ifndef STATIC
|
||||
if (selfmodifiable) {
|
||||
MakeExecutableModifiable();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue