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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:12:54+00:00 2026-06-18T08:12:54+00:00

An embedded Linux system that continuously writes files (~1/s) to a FAT32 partition occasionally

  • 0

An embedded Linux system that continuously writes files (~1/s) to a FAT32 partition occasionally corrupts the partition when interrupted. The process can be interrupted 2 ways: a power cycle, or using musb_hdrc/gadget to copy files to and from the host via USB. The musb_hdrc/gadget is used to switch access to the partition from internal embedded control to USB for transferring files to and from an external host. The solution may be to do a killall process-name but will this safely kill the Linux process? IOW: will the process complete any file IO already started or will there still be corrupted partitions? According to the killall man page If no signal name is specified SIGTERM is sent. Does something need to be added to the code to make sure the kill is clean and/or is there a special killall signal name to do a clean kill?

  • 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-18T08:12:55+00:00Added an answer on June 18, 2026 at 8:12 am

    Well, you can modify your application to catch any signal except SIGKILL.
    Shutdown operation or cleanup can be performed in a signal handler
    Here is a simple example of setting up a handler to delete temporary files when certain fatal signals happen:

    #include <signal.h>
    
     void
     termination_handler (int signum)
     {
       printf ("Caught signal %d\n", sig);
       switch(signum)
       {
           case SIGINT:
           printf ("CTRL C not allowed\n");
           break;
    
           case SIGTERM:
           struct temp_file *p;
           for (p = temp_file_list; p; p = p->next)
               unlink (p->name);
           exit(1);
           break;
    
           default:
       ...
       }
     }
    
     int
     main (void)
     {
       ...
       if (signal (SIGINT, termination_handler) == SIG_IGN)
         signal (SIGINT, SIG_IGN);
       if (signal (SIGHUP, termination_handler) == SIG_IGN)
         signal (SIGHUP, SIG_IGN);
       if (signal (SIGTERM, termination_handler) == SIG_IGN)
         signal (SIGTERM, SIG_IGN);
       ...
     }
    

    Code after signal handler will not execute in case of SIGTERM.

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

Sidebar

Related Questions

In an embedded Linux system, I'm trying to show a shutdown notification that should
I'm working on an embedded Linux project. Our build process makes an image that
I'm porting and existing system that used level triggered interrupts to an embedded Linux
Currently I am working with a embedded system that has the Linux OS. I
I have an embedded Linux app that writes to a file at a fairly
I have an system running embedded linux and it is critical that it runs
I'm working on an embedded ARM Linux system, and occasionally (but not always) I
I have several embedded linux systems that I want to write a 'Who's Online?'
I have a Node.js web server running on an embedded Linux system. For authentication
I'm developing C/C++ software for an embedded Linux system with the AT91SAM9G20 processor from

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.