Need to know about Event Management


 
Thread Tools Search this Thread
Top Forums Programming Need to know about Event Management
# 1  
Old 04-26-2006
Need to know about Event Management

Hi
I need to understand abt Event Management Library for example..A module will be responsible for Handling the event posted by the other modules...and creating a new process for handling the event posted by the other modules..also after completing the event clearing of the event...

Need to know abt how to perform this it would be good if i get a reference code for the above....
# 2  
Old 04-26-2006
The only event management I know about is hardware specific stuff like this from intel:

http://resource.intel.com/telecom/su...tml#P438_25372

Is this what you mean? Or do you mean IPC ?
# 3  
Old 04-27-2006
Hi..

Thanks for ur reply ..I mean IPC..apart from this i too have another question for you ...

The question is :

1. we have a client & server ,and TFTP is running on the server.
2.we have 3 files a.exe,b.exe,c.exe in the client machine....we need to transfer all the 3 files to the server and store it into a DIR...
3.then we need to check in the server whetehr all the three files are sucessfully transfered..if s then in the server we need to exectue the 3 exe...

R u clear with this if not let me know where ur stuckup...
# 4  
Old 04-27-2006
you can do this without complex ipc - just create checksums, and use a file as a "semaphore"

1. create a cksum file for each exe and two dummy files one empty, one with a few bytes in it
Code:
cksum exe1> exe1.cksum
..........
> /patha/dummy
echo "completed" > /pathb/dummy

2. ftp the cksum files along with each exe like this:
Code:
.........
put /patha/dummy
put exe1
put exe2
put exe3
put exe1.cksum
put exe2.cksum
put exe3.cksum
put /pathb/dummy
.............

3. On the remote machine fire this job off
Code:
#!/bin/ksh 
let counter=0
while [ -s dummy ]
    sleep 5
    counter=$(echo "$counter +1" | bc)
    if [ "$counter" > "100" ] ; then
         echo "ftp not completed"
    fi
done
for file in `ls exe*`
do
     cksum "$file" > tmp.cksum
     diff tmp.cksum "$file".cksum
     if [ $? -eq 0 ] ; then
     # run the file
           "$file"       
     else 
          echo " $file not received correctly"
     fi
done

ipc information Read chapter 5, it works for most unix flavors, even though it's written for Linux:
http://www.advancedlinuxprogramming.com/alp-folder

Last edited by jim mcnamara; 04-27-2006 at 02:11 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question