mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Off topic question about shebang and exec()
@ 2023-03-02 14:15 Paul Schutte
  2023-03-02 16:32 ` Markus Wichmann
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Schutte @ 2023-03-02 14:15 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-03 11:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 14:15 [musl] Off topic question about shebang and exec() Paul Schutte
2023-03-02 16:32 ` Markus Wichmann
2023-03-02 17:52   ` A. Wilcox
2023-03-03 11:17     ` [musl] " Valery Ushakov

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).