Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7867845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:48:55+00:00 2026-06-03T00:48:55+00:00

I wish to make interactive code learning system, it allows users, (young programmers normally)

  • 0

I wish to make interactive code learning system, it allows users, (young programmers normally) to write contents of one function in c++ language, send it to server and there it will be compiled into dynamic library and called from main program.

Program expects function to return correct answer depending on given parameters.

Of course, there will be some kids, that will cause errors like segmentation fault. (server is Linux powered).

So, can I make signal handler that would exit function?

What I wish to accomplish:

for (int i = 0; i < PLAYER_NUM; i++) {
    snprintf(buf, sizeof(buf), "players/%s.so", player[i]);
    handle = dlopen(buf, RTLD_LAZY);
    add[i] = (int (*)(int, int))dlsym(handle, "sum");
} // that was simply loading of functions from libraries.

for (int x = 0; x < 10; x++)
    for (int i = 0; i < PLAYER_NUM; i++) {
        if(failed[i]) continue;
        ret = add[i](x, 5);

    if(sigfault_received() || res != (x + 5)) {
        failed[i] = true;
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:48:57+00:00Added an answer on June 3, 2026 at 12:48 am

    Faulty code can cause all kinds of issues which might not be recoverable. So handling SIGSEGV won’t really help.

    The solution is to run that code in a separate process and use IPC, pipes or sockets to communicate with the main process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a large system that I have coded and I wish to make
I wish to make a function that checks whether theres any number in the
I wish to make a custom kernel, that loads and executes code (my code
* Scenario i wish to make a jquery effect like the one found on
I wish to make sure that my data has a constraint the following check
I’m starting my development in Cocos2D and I wish to make this card effect
I am using jQuery, and wish to make certain links open in a new
I have some REST web services implemented in WCF. I wish to make these
I'm working on my high-school matriculation asp.net project, and I wish to make a
I am creating a GTK Window which, for various reasons, I wish to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.