09-24-2012
help with IPC + thread
Actually i am thinking of some usefull application that involves both IPC and pthreads.But i am not quite sure what type of application involves both these together
.
Anyways i am now working on creating a simple featured file manager that can do the following:
- Display file name and size.
- Rename any particular file.(DONT KNOW THIS )
- Move any file to any directory
- copy any file to any directory
- Delete any particular file
- Display contents of any file
But i dont exactly know how to do these things
Most importantly can anyone suggest an application that involves both IPC and pthreads?
5 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a parent that is passing data to child A and then child A has to process it and pass to child B. I am able to pass the data to child A but am not able to pass it to child B. Child B seems to only be receiving the last data instead of the whole data.
I saw one example in a book but it uses... (1 Reply)
Discussion started by: scmay
1 Replies
2. Programming
how about asynchronous canceling?
or with signal?
if with signal whether it effects the process?
my english so badly :( :( (1 Reply)
Discussion started by: alan.zhao
1 Replies
3. Solaris
I was asked to look into a problem with a Sun Netra 440 in another department. On the server in question, the relevant 'uname -a' information is, "SunOS host1 5.9 Generic_118558-16 sun4u sparc SUNW,Netra-440". That information aside, while the other admin is logged into the ALOM, these errors are... (0 Replies)
Discussion started by: Borealis
0 Replies
4. Programming
Hi!
I wanted to know the advantages / disadvantages of different IPC mechanims such as sockets, pipes (unnamed) , shared memory & message queues.
Pipes for example i hear are fast , but are difficult to debug as compared to sockets.
Can you guys please name some situations where one is... (4 Replies)
Discussion started by: _korg
4 Replies
5. Programming
Suppose I have 5 independent process divided in two imaginay sets:
set1 set2
---------------------
p1 p3
| |
p2 p4
|
p5
The processes inside each set communicate mutually quite often.
I mean p1 and p2 communicate mutually quite often
Similarly p3, p4 and p5 communicate mutually... (2 Replies)
Discussion started by: rupeshkp728
2 Replies
LEARN ABOUT REDHAT
ipc::msg
IPC::Msg(3pm) Perl Programmers Reference Guide IPC::Msg(3pm)
NAME
IPC::Msg - SysV Msg IPC object class
SYNOPSIS
use IPC::SysV qw(IPC_PRIVATE S_IRWXU);
use IPC::Msg;
$msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU);
$msg->snd(pack("l! a*",$msgtype,$msg));
$msg->rcv($buf,256);
$ds = $msg->stat;
$msg->remove;
DESCRIPTION
A class providing an object based interface to SysV IPC message queues.
METHODS
new ( KEY , FLAGS )
Creates a new message queue associated with "KEY". A new queue is created if
o "KEY" is equal to "IPC_PRIVATE"
o "KEY" does not already have a message queue associated with it, and "FLAGS & IPC_CREAT" is true.
On creation of a new message queue "FLAGS" is used to set the permissions.
id Returns the system message queue identifier.
rcv ( BUF, LEN [, TYPE [, FLAGS ]] )
Read a message from the queue. Returns the type of the message read. See msgrcv. The BUF becomes tainted.
remove
Remove and destroy the message queue from the system.
set ( STAT )
set ( NAME => VALUE [, NAME => VALUE ...] )
"set" will set the following values of the "stat" structure associated with the message queue.
uid
gid
mode (oly the permission bits)
qbytes
"set" accepts either a stat object, as returned by the "stat" method, or a list of name-value pairs.
snd ( TYPE, MSG [, FLAGS ] )
Place a message on the queue with the data from "MSG" and with type "TYPE". See msgsnd.
stat
Returns an object of type "IPC::Msg::stat" which is a sub-class of "Class::Struct". It provides the following fields. For a description
of these fields see you system documentation.
uid
gid
cuid
cgid
mode
qnum
qbytes
lspid
lrpid
stime
rtime
ctime
SEE ALSO
IPC::SysV Class::Struct
AUTHOR
Graham Barr <gbarr@pobox.com>
COPYRIGHT
Copyright (c) 1997 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.
perl v5.8.0 2002-06-01 IPC::Msg(3pm)