C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Signal Handling Posted by fj8283888 on 13 May 2004 at 5:42 PM
HI:
I try to make a program which allows processes from different locations communicate each other. For example, Couple SSH were opened, if one SSH sends a message to the specific destiniation, it passes the message via ESD (event server daemon) to the destination.
Could anyone tell me where should I start from?

The following is the components of the program:
es_subscribe( ) - allocate and initialize any data structures the ES requires;

es_notify(int task_id, int event)
generate event for the process identified by task_id (analogous to the system call kill(.));

int es_wait_event(int event, ... )
block until at least one of the events in the argument list occurs and return any one of those events (equivalent to the wait_event construct presented in lectures;

HNDLR es_on_event(int event, HNDLR somefn)
nominate the function somefn to be invoked as soon as notification of event arrives (equivalent to the on_event construct presented in lectures and analogous to the system call signal( )).

Report
Re: Signal Handling Posted by tom_sw on 14 May 2004 at 8:39 AM
: HI:
: I try to make a program which allows processes from different locations communicate each other. For example, Couple SSH were opened, if one SSH sends a message to the specific destiniation, it passes the message via ESD (event server daemon) to the destination.
: Could anyone tell me where should I start from?
:
: The following is the components of the program:
: es_subscribe( ) - allocate and initialize any data structures the ES requires;
:
: es_notify(int task_id, int event)
: generate event for the process identified by task_id (analogous to the system call kill(.));
:
: int es_wait_event(int event, ... )
: block until at least one of the events in the argument list occurs and return any one of those events (equivalent to the wait_event construct presented in lectures;
:
: HNDLR es_on_event(int event, HNDLR somefn)
: nominate the function somefn to be invoked as soon as notification of event arrives (equivalent to the on_event construct presented in lectures and analogous to the system call signal( )).
:
:
This look slike *nix, what compiler / envirinment are you using?
Report
Re: Signal Handling Posted by fj8283888 on 15 May 2004 at 12:28 AM
this is under UNIX enviornment with using C compiler.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.