Solved

Simulating Events using Signals..

Posted on 1998-11-12
5
318 Views
Last Modified: 2010-04-21
If anubody has sample code or algorithms of how to implement
Win32 events using Unix Signals.
In Win32 signal is an object which can be created by my program and i can query its value to get acknowledged about some conditions.The signals can be set about these condiotions by other processes to which i will pass the handle of event.So only thing is that it is not asynchronous as signals which directly send to process & hadlers have to be written.
Please get a little idea about Win32 events if you are already familiar.

Thanks in advance.
0
Comment
Question by:flower020397
5 Comments
 
LVL 4

Expert Comment

by:davidmwilliams
ID: 2007802
 Why not use the USR type signals in Unix?  Or even a block of shared memory?
0
 
LVL 1

Accepted Solution

by:
ksb earned 250 total points
ID: 2007803
Under UNIX you are talking about IPC objects (shared memory, semaphores, and the like).

The ipcs command shows the existing object.  Processes can map them in to their address space to manupulate them.  You can wait for a p/v operation on semaphore.

The "acknowledged" part is a p/v set, the conditions are set in  shared memory in a C structure.  You define the structure, map in sizeof(that_struct), and use the pointer as a pointer to that type.

You are set.

--
ksb
0
 

Author Comment

by:flower020397
ID: 2007804
I am getting hint about wahr are you saying.But will you please send me some  some pseudo code or snippet of already written code which can serve as an example for such an implementation...



Regards
0
 

Author Comment

by:flower020397
ID: 2007805
I am getting hint about wahr are you saying.But will you please send me some  some pseudo code or snippet of already written code which can serve as an example for such an implementation...



Regards
0
 
LVL 7

Expert Comment

by:linda101698
ID: 2007806
flower,
Please check your email address.  It seems to belong to someone else.  Correct it or I will close this account.

Linda Gardner
Customer Service @ Experts Exchange
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now