Hello!
I have a program which consists of N processess. One of them (the parent) has created sets of semaphores, shared memory and message queue. How to clean after this program nicely? I know i...
Type: Posts; User: kbzium
Hello!
I have a program which consists of N processess. One of them (the parent) has created sets of semaphores, shared memory and message queue. How to clean after this program nicely? I know i...
Thank you for your reply!
But how can i "spare" the first message that client sent me via telnet? If dedicated client would write some dummy hello "I'm a client not telnet" it must be processed by...
Hi there,
what's the best (simpliest) way to determine if a client is using telnet? I'm writing simple chat on linux and it must have different functionality for different type of clients. Telnet...
Maybe it has something to do with message queue? But... if one process read, this data is lost... so only one could read...
It appears that the semantics that you've posted is the one that i'm looking for. But still, i can't think of any solution to this problem.
They should block if there are no new messages. If a new message appear, than first of the readers should come in and let the others in. But there's a problem. Noone can leave this part of code until...
Oh I meant line 18... It holds all readers until a writer won't V(USED)... It is written so. There is a vital question:
if N processess wait at semaphore A which has been latched by first of them,...
I understand that P(buf_free) at the line 9 (in post 10) latches all the readers so they must wait until a writer writes something. Then they all should get into next lines, yeah?
But it doesn't...
But wouldn't this make processess read messages not simultanously but sequentionally which is not what i intended?
Thank you!
Hello,
i'am thinking how to deal with such problem:
There're N child processess and one shared memory to let them communicate between each other. Every one of them should be able to write a...
Quzah i thought about it at first, setting a flag is easy but what about unsetting it? Who would do that?
I did it by "brute force": i added checksum to every last message so all the clients...
How can i make one child-server process write message to all the other sibling processes in a real-time? That's why i thought about pipes...
I did it with 2-dim array. I think it's okay enough. There is one more thing. Let's suppose i forked my parent process several times, and before that fork statement there was a table of 2 int's named...
So what i might do is making simple two-dimensional char array like char X[A][B] where A is the number of strings which i'm gonna have in it (10, so it's not a problem) and B is the length of each...
Hi,
i have a structure named A. I use shmget and shmat to create shared memory first, then assign my object to it. After that i do some forks. So they heritage this id and pointer, which shmget...
I'd like to post it here but i'm worrying that someone would get it too and i would be accussed of stealing not my work (which would be very unpleasant). I've tried to send it to you on private, but...
Thanks for your reply.
Yes, i use subprocesses to handle each client individually. That's the way they did it in classes so i did it to and i'd rather do it that way even if that may be not the...
Hi there,
i have to write simple tcp messanger on linux. It has to have some basic functionality - when connecting via telnet, it must react to basic commands as put, get and exit and so on and...