Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 2 Mar 2023 16:15:38 +0200
From: Paul Schutte <sjpschutte@...il.com>
To: musl@...ts.openwall.com
Subject: Off topic question about shebang and exec()

Hi all

I apologize for abusing the knowledge of the people on this list, but I
know they will know the answer. Google does not provide a usable answer.

I am busy writing a toy language and I would like it to be used as both a
compiler and "interpreter"

I would like it to compile the source and then run the resulting binary
when the source file is called via the shebang and it should just do a
normal compile when called with "compile code.src"

argv[0] contains the path to the compiler in both cases, which makes sense.

Is there any way to determine which method was used to call the compiler?

Kind Regards
Paul

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.