crepl | simple REPL | Code Editor library
kandi X-RAY | crepl Summary
kandi X-RAY | crepl Summary
crepl is a simple REPL (read-eval-print loop) for C, implemented in Perl.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of crepl
crepl Key Features
crepl Examples and Code Snippets
Community Discussions
Trending Discussions on crepl
QUESTION
I have written a nice little perl script that is very useful to me. It allows me to compile and execute C instructions as if it were instructions of an interpreted language. It is the C programming IDE of sorts that I'm using to learn the C language.
Here's how I use it :
...ANSWER
Answered 2021-Feb-03 at 21:23The Segmentation fault (core dumped)
message you sometimes see in the terminal is not produced by the process you launch but by the shell that launched this process.
When it launches a process, the shell waits for it with a system call similar to man 3 waitpid
.
Such a system-call tells if the process exited successfully (with return
or _exit()
) or was killed by a signal.
In this last case, the shell displays a message specific to the signal that caused the early termination (man 3 strsignal
).
In your specific case, this is not the shell that launches the process you wrote in C, but the perl interpreter. Your process being killed does not make perl be killed too, so your shell does not display such a message.
I cannot write perl but I'm certain that you can replace system $compiled_code;
by something that does the equivalent of fork()/exec()/waitpid()/strsignal()
.
Using the end of this page, I think you can try this at the end of your script.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install crepl
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page