Help for C program using processes and signals

This is a discussion on Help for C program using processes and signals within the Linux Programming forums, part of the Platform Specific Boards category; Hello! First of all I want to appologise that my english is not very good but I hope you`ll understand ...

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    2

    Question Help for C program using processes and signals

    Hello!

    First of all I want to appologise that my english is not very good but I hope you`ll understand me.

    I have source code of C program and the only thing i have to do is change 1 condition to another, but im not very familiar with C programming thats why Im looking for help.

    So, the assigment for this program is :
    Process(co-ordinator) which creates 10 working processes. These processes are waiting to be awaken by the co-ordinator, they do some job and wait again. Co-ordinator passes marker (integer) to the first process and awakes it. Co-ordinator adds 1 to the marker and passes it to the next process. Coordinator awakes next process, which executes the same actions and etc. After the marker passes through all processes, coordinator prints its content. FOr signaling the processes use signals and for passing the marker use messages.

    I have the ready program but using semaphores insted of signals.

    kursova.c -> Source code of the program
    kursova.c - 4shared.com - online file sharing and storage - download

    sem.c -> Source code for semaphore
    sem.c - 4shared.com - online file sharing and storage - download

    My task is to use signals instead of semaphores. I`ll be very grateful is someone can help me!

    Thanks in advance !!

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,558
    Try Pastebin.com - #1 paste tool since 2002! if you've got lots of code.
    Few here can be bothered waiting for some d/l site to count down in order to help you.

    Better still, post it inline (with code tags).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Dec 2010
    Posts
    2

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with piping and signals
    By busdude in forum C Programming
    Replies: 7
    Last Post: 03-05-2010, 04:40 PM
  2. Using signals between unrelated processes (C/Linux)
    By sauronnikko in forum C Programming
    Replies: 3
    Last Post: 06-29-2009, 04:20 AM
  3. catching signals and process IDs
    By imtiaz3 in forum C Programming
    Replies: 1
    Last Post: 09-27-2008, 08:10 PM
  4. Problem with signals
    By kahad in forum C Programming
    Replies: 9
    Last Post: 12-07-2006, 09:42 AM
  5. Signal Handling program
    By langdoy in forum C Programming
    Replies: 4
    Last Post: 03-25-2002, 11:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21