Search:

Type: Posts; User: Abs

Search: Search took 0.01 seconds.

  1. Replies
    18
    Views
    12,085

    yeah...sorry about the vagueness of "this". I...

    yeah...sorry about the vagueness of "this". I was referring to just having the signal handler make the child call _exit when it recieves the signal and then resetting the shared counter back to 0.
    ...
  2. Replies
    18
    Views
    12,085

    Interesting, I didn't know you could set a mutex...

    Interesting, I didn't know you could set a mutex to span multiple processes... I always thought the pthread library was more specific to the threads located in a single process. But I guess now that...
  3. Replies
    18
    Views
    12,085

    Nevermind, I just realized I don't need to share...

    Nevermind, I just realized I don't need to share that between processes as the signal handler only cares about the current running process. Maybe I'll forget the whole decrement forced exit...so...
  4. Replies
    18
    Views
    12,085

    Is there an easy way to share a volatile...

    Is there an easy way to share a volatile sig_atomic_t between processes? If I have to add it to my shared memory segment then I would need to still attach to the shared memory and update the value. ...
  5. Replies
    18
    Views
    12,085

    Well, it's interesting... I'm now using...

    Well, it's interesting... I'm now using semaphores to protect the shared memory and I'm still getting the same behavior as before where for somereason one of the child processes goes to sleep......
  6. Replies
    18
    Views
    12,085

    Thank you so much for those links, I'm still...

    Thank you so much for those links, I'm still going through them. And am going to take a stab at implementing it with a semaphore. I'll post back with my results. Another question though... With...
  7. Replies
    18
    Views
    12,085

    brewbuck, thank you for your comments... Since...

    brewbuck, thank you for your comments... Since I'm doing everything with fork, I would need to do a considerable rewrite to get this working using threads instead, so I'd like to avoid pthreads. ...
  8. Replies
    18
    Views
    12,085

    right, from what I've read since getting in and...

    right, from what I've read since getting in and only incrementing/decrementing a counter is such a small and fast operation a spinlock is ideal as it doesn't require any context switches etc... and...
  9. Replies
    18
    Views
    12,085

    Sure thing. Here is my code snippet that does...

    Sure thing.

    Here is my code snippet that does the checking and and forking etc... My scontext is a struct with two integers.. children and updating.


    if...
  10. Replies
    18
    Views
    12,085

    Linux Putting my children to sleep with futex!?

    Hey all, I'm not the most seasoned person writing in C however I'd like to think I'm coming along :-) I'm just about finished with a program I've been writing for a little while now that is a basic...
Results 1 to 10 of 10