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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:16:36+00:00 2026-06-05T12:16:36+00:00

There is a process in Linux (Ubuntu) that opens a file for reading but

  • 0

There is a process in Linux (Ubuntu) that opens a file for reading but does not close it deliberately. Is the file descriptor closed by the OS automatically when the process is terminated?

My specific case is in Rails application, where I open a binary file. My web server spawns multiple Rails processes. The file is opened from a singleton in each Rails process. I need to know if this binary file is closed automatically when the Rails process is terminated.

  • 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-05T12:16:37+00:00Added an answer on June 5, 2026 at 12:16 pm

    Yes, closing all open descriptors is part of the process termination routines. You can see it at the do_exit() function, which calls exit_files() which also, at some point, will call close_files().

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

Sidebar

Related Questions

Context: OS: Linux (Ubuntu), language: C (actually Lua, but this should not matter). I
Is there a standard linux/unix pattern for communicating with long running process? For example,
In My application have time consuming process.There fore i try to do that operation
In a system I am currently working on, there is one process that loads
Is there a way not to process fields with a display:none style ? The
There is any command line or .NET method that runs a process in the
Is there a limit on the stack size of a process in Linux? Is
I'm wondering if there's a way to write-protect every page in a Linux process'
I have a linux process but I am taking some core dumps some times.
The situation I'm in is this - there's a process that's writing to a

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.