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

  • Home
  • SEARCH
  • 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 8612035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:31:39+00:00 2026-06-12T04:31:39+00:00

On Ubuntu 12.04, open a new text file and write: #include <stdlib.h> int main()

  • 0

On Ubuntu 12.04, open a new text file and write:

#include <stdlib.h>

int main()
{
    abort();
    return 0;
}

Now run:

g++ yourfile.cpp

Then run the executable, which will core dump:

./a.out

Now check the mtime of the file:

-rw-r----- 1 xxxxx xxxxx 228K 2012-10-01 19:20:20.752136399 -0500 core

Now run the executable again:

./a.out

Now check the mtime again:

-rw-r----- 1 xxxxx xxxxx 228K 2012-10-01 19:20:20.752136399 -0500 core

It’s the same! Why doesn’t a fresh core dump overwrite the old one? When rebuilding this causes gdb to complain the core is older than the executable.

Just to be sure it wasn’t a permissions problem, I tried this in a fresh directory in /tmp and ran chmod -R 777 **/* inside. Running the executable twice still didn’t produce a new core O_o Also, ulimit -c reports 800000000, more than enough for a core this size.

I also tried running a clean bash with env - bash --noprofile --norc and still running the binary doesn’t update the mtime of the core unless I delete it first.

  • 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-12T04:31:40+00:00Added an answer on June 12, 2026 at 4:31 am

    If you refer to https://bugs.launchpad.net/ubuntu/+source/apport/+bug/160999 this is a bug in Ubuntu using O_EXCL to open the file, preventing it from overwriting an existing core.

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

Sidebar

Related Questions

Ubuntu 12.04 has an open bug regarding openssl. If you try to connect to
I'm trying the open a relative path in Ubuntu , but after opening the
I want to open html files from a shell script. I know that Ubuntu
Ubuntu Server 9.10, Here is my file, test.py import commands blkid = commands.getoutput('blkid') print
On Ubuntu, I am trying to download a file (from a script) using wget.
Using Ubuntu, when I run bundle install to set up my Rails environment, it
I'm using ubuntu 11.04 and im trying to write a bash script that opens
I'm trying to use JFileChooser to open a file. I find the file I
I'm new to Ruby on Rails and have just set it up in Ubuntu
I'm new to Linux and especially to Ubuntu 11 which I'm just trying today

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.