sh: Close script file on exec

This commit is contained in:
apio 2023-04-18 16:42:43 +02:00
parent 407e81b107
commit 4baee3a91f
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -73,7 +73,10 @@ Result<int> luna_main(int argc, char** argv)
interactive = true; interactive = true;
} }
else else
{
input_file = TRY(File::open(path, File::ReadOnly)); input_file = TRY(File::open(path, File::ReadOnly));
input_file->set_close_on_exec();
}
while (1) while (1)
{ {