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 751603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:41:08+00:00 2026-05-14T14:41:08+00:00

Is there a way to configure the directory where core dump files are placed

  • 0

Is there a way to configure the directory where core dump files are placed for a specific process?

I have a daemon process written in C++ for which I would like to configure the core dump directory. Optionally the filename pattern should be configurable, too.

I know about /proc/sys/kernel/core_pattern, however this would change the pattern and directory structure globally.

Apache has the directive CoreDumpDirectory – so it seems to be possible.

  • 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-05-14T14:41:09+00:00Added an answer on May 14, 2026 at 2:41 pm

    No, you cannot set it per process. The core file gets dumped either to the current working directory of the process, or the directory set in /proc/sys/kernel/core_pattern if the pattern includes a directory.

    CoreDumpDirectory in apache is a hack, apache registers signal handlers for all signals that cause a core dump , and changes the current directory in its signal handler.

    /* handle all varieties of core dumping signals */
    static void sig_coredump(int sig)
    {
        apr_filepath_set(ap_coredump_dir, pconf);
        apr_signal(sig, SIG_DFL);
    #if AP_ENABLE_EXCEPTION_HOOK
        run_fatal_exception_hook(sig);
    #endif
        /* linuxthreads issue calling getpid() here:
         *   This comparison won't match if the crashing thread is
         *   some module's thread that runs in the parent process.
         *   The fallout, which is limited to linuxthreads:
         *   The special log message won't be written when such a
         *   thread in the parent causes the parent to crash.
         */
        if (getpid() == parent_pid) {
            ap_log_error(APLOG_MARK, APLOG_NOTICE,
                         0, ap_server_conf,
                         "seg fault or similar nasty error detected "
                         "in the parent process");
            /* XXX we can probably add some rudimentary cleanup code here,
             * like getting rid of the pid file.  If any additional bad stuff
             * happens, we are protected from recursive errors taking down the
             * system since this function is no longer the signal handler   GLA
             */
        }
        kill(getpid(), sig);
        /* At this point we've got sig blocked, because we're still inside
         * the signal handler.  When we leave the signal handler it will
         * be unblocked, and we'll take the signal... and coredump or whatever
         * is appropriate for this particular Unix.  In addition the parent
         * will see the real signal we received -- whereas if we called
         * abort() here, the parent would only see SIGABRT.
         */
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to configure the directory where all the configuration files are
Is there a way to configure the default directory in web.config? My Default.aspx file
Is there a way to configure nautilus to open a file into an existing
is there a way to configure WebSphere Portal to accept AJP connections? E.g. Tomcat/JBoss
Is there any way to configure Doxygen to include the log from SVN for
is there a way to configure trac to use more than one svn repo
Is there a way to configure Jenkins to resume a (broken) Maven build from
Is there a way to configure a binary to be installed as SUID using
Can anyone say is there any way to configure request filtering for WCF get
Is there a particular way to configure an NSPredicate to compare dates? Essentially I

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.