06-12-2010
This User Gave Thanks to zius_oram For This Post:
10 More Discussions You Might Find Interesting
1. Programming
unix IPC
i would like to know the method of usage of semaphores on shared memory segments the topic seems very difficult to understand mainly when difrent proceses communicate instantly and how do i avaoid deadlock situation (2 Replies)
Discussion started by: kamathanil
2 Replies
2. HP-UX
Hi All,
i am running a oracle procedure which writes a file . The same file is picked up by another script which runs in a cron after every 5 minutes.
Now the problem is that sometimes my script picks up a file while the procedure is still writing data in the file.
is there is any way i... (4 Replies)
Discussion started by: saurabhjain
4 Replies
3. Programming
I have an application that is multithreaded and concurrent. Multiple instances of the application must run at the same time.
Each thread in each process accesses shared resources. For this purpose I've employed Butenhof's read-write locks. Inter-process locking is based on fcntl. For example,... (3 Replies)
Discussion started by: adamb
3 Replies
4. UNIX for Advanced & Expert Users
Hi,
I am thinking about writing a log daemon for a multi-processed ksh application (yes - I know that high-level language would be a better option).
My question is as follows:
If many processes (many scripts) will try writing to a single log file:
print "message" > common.log
Will it work or... (2 Replies)
Discussion started by: adderek
2 Replies
5. Programming
i want to write a C chat program that communicates over IPC(inter process communication), that could be run using 2 seperate terminal windows within the same computer. so that wat u type in one terminal window , should appear on the other and vice versa...
could some one please help me with the... (2 Replies)
Discussion started by: localp
2 Replies
6. Shell Programming and Scripting
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
7. Solaris
Hi
want to know what file (descriptor+filename+socket) is being accessed by particular process on solaris.
Purpose : while running perf. test, needs to find where is the bottleneck.
We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern... (1 Reply)
Discussion started by: raxitsheth
1 Replies
8. IP Networking
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies
9. IP Networking
hi
am newbie to unix and socket programing
I am trying to figuring out syntax for read and write
to send data from server to client and client can read it
I have to send two integers
write(newsockfd,buffer,"%d %d",x,y,0) writing from client where x and y are two integers..
... (7 Replies)
Discussion started by: karthik1238
7 Replies
10. Programming
HI
I need to implement a client/server TCP application. the customer is the client and the bartender is the server.
When the customer enter the Bar, client connects to the server
Server should reply the client immediately. Other wise if the server is busy, it should send an update message... (10 Replies)
Discussion started by: lixiao1212
10 Replies
LEARN ABOUT OSF1
pthread_rwlockattr_setpshared
pthread_rwlockattr_setpshared(3) Library Functions Manual pthread_rwlockattr_setpshared(3)
NAME
pthread_rwlockattr_setpshared - Sets the process-shared attribute in a read-write lock attributes object.
LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so)
SYNOPSIS
#include <pthread.h>
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared);
PARAMETERS
Address of the read-write lock attributes object whose process-shared attribute is to be set. Value to set in the process-shared attribute
of attr. Must be the value PTHREAD_PROCESS_SHARED, to permit access to the read-write lock by any thread in any process that can access the
memory where the lock object is allocated, or PTHREAD_PROCESS_PRIVATE, to permit access to the read-write lock only by threads in the same
process as the thread that initialized the read-write lock object.
DESCRIPTION
This routine uses the value in pshared to set the process-shared attribute in the read-write lock attributes object referenced by attr. The
object referenced by attr must be initialized before this routine is called. The value of pshared must be either PTHREAD_PROCESS_SHARED or
PTHREAD_PROCESS_PRIVATE, as defined in the pthread.h include file.
If the process-shared attribute is set to PTHREAD_PROCESS_PRIVATE, the read-write lock object can only be operated upon by threads created
within the same process as the thread that initialized the read-write lock object. If threads of differing processes attempt to operate on
such a read-write lock object, the behavior is undefined.
The default value of the process-shared attribute of a read-write lock attributes object is PTHREAD_PROCESS_PRIVATE.
If the process-shared attribute of a read-write lock attributes object is set to PTHREAD_PROCESS_SHARED, the read-write lock object can be
operated upon by any thread that has access to the memory where that object is allocated, even if that object is allocated in memory that
is shared by multiple processes.
RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Successful completion. The value specified by attr is not a valid attributes object, or the value pshared is outside the range of legal
values for that attribute.
ERRORS
None
RELATED INFORMATION
Functions: pthread_rwlockattr_getpshared(3), pthread_rwlockattr_init(3)
Manuals: Guide to DECthreads and Programmer's Guide
delim off
pthread_rwlockattr_setpshared(3)