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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:20:26+00:00 2026-05-30T02:20:26+00:00

Hi I have a program that requires a child process to modify a link

  • 0

Hi I have a program that requires a child process to modify a link list which the parent process keeps track of. Basically in the parent process I have a signal handler such as ..

struct sigaction sa;
sa.sa_handler = someFunction;
sigemptyset(&sa.sa_mask);
sa.sa_flags = SA_RESTART;
if(sigaction(SIGUSR1, &sa, NULL) == -1){
    printf("We have a problem, sigaction is not working.\n");
    perror("\n");
    exit(1);    
}

Where the sa_handler is the modifying function. Then I have a global linked list that the parent process contains called struct conectionClient. The function that I use to modify the link list works, but when I call the signal handler as in …

if(!fork){
raise(SIGUSR1);
exit(0);
} 

And I fork(),fork(),… fork(), the parent process doesn’t remember the previous forks like somethings been reset and the link list starts all over again. Is there something that I’m missing?

Thanks

  • 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-30T02:20:28+00:00Added an answer on May 30, 2026 at 2:20 am

    Huh?

    You seem to be missing the fact that each process runs in its own, private, memory space. A child can’t modify anything in the parent’s memory. This is true unless your operating system is basic enough to not support memory protection, in which case you must say so very clearly.

    You should probably look into threads, which are parallel paths of execution in a shared memory space.

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

Sidebar

Related Questions

I have a program that requires user input, which I save to a file
We have a java program that requires a large amount of heap space -
For the program idea I have, it requires that the software be written in
I have a program that fundamentally requires a lot of memory. However, for some
I have a program that requires cascaded SSH, i.e. it ssh A server and
I have a program I am working on that requires us to overload the
I have a program that requires fast performance. Within one of its inner loops,
I have a program that requires both x64 and x86 dlls (it figures out
Hey, I am in the process of refactoring a program that requires some amount
I am currently implementing a program that requires me to handle threads and process.

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.