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 HPUX
pthread_rwlockattr_getpshared
pthread_rwlockattr_getpshared(3T) pthread_rwlockattr_getpshared(3T)
NAME
pthread_rwlockattr_getpshared(), pthread_rwlockattr_setpshared() - get or set the process-shared attribute
SYNOPSIS
PARAMETERS
attr Pointer to the read-write lock attributes object whose attributes are to be set/retrieved.
pshared This parameter either specifies the new value of the process-shared attribute (set function) or points to the memory loca-
tion where the process-shared attribute of attr is to be returned (get function).
DESCRIPTION
The attributes object attr must have been previously initialized with the function before these functions are called.
Read-Write locks can be used only by threads within the process or shared by threads in multiple processes. The process-shared attribute in
a read-write lock attributes object describes who may use the read-write lock. The legal values for the process-shared attribute are:
This option permits a read-write lock to be operated upon by any thread
that has access to the memory where the read-write lock is allocated. The application is responsible for allocating the
read-write lock in memory that multiple processes can access.
The read-write lock can only be operated upon by threads created within
the same process as the thread that initialized the read-write lock. If threads of differing processes attempt to operate on
such read-write lock, the behavior is undefined.
The default value of process-shared is
is used to set the process-shared attribute in the initialized attributes object attr. The new value of the process-shared attribute of
attr is set to the value specified in the pshared parameter.
retrieves the value of the process-shared attribute from the read-write lock attributes object attr. The value of the process-shared
attribute of attr is returned in the pshared parameter.
RETURN VALUE
Upon successful completion, and return zero. Otherwise, an error number is returned to indicate the error (the variable is not set).
ERRORS
If any of the following occur, the and functions return the corresponding error number:
is not defined and these functions are not supported.
For each of the following conditions, if the condition is detected, the and functions return the corresponding error number:
The value specified by
attr is invalid.
The value specified by
pshared is not a legal value.
The value pshared points to an illegal address.
WARNINGS
If a read-write lock is created with the process-shared attribute defined as the cooperating processes should have access to the memory in
which the read-write lock is allocated.
AUTHOR
and were developed by X/Open.
SEE ALSO
pthread_create(3T), pthread_rwlockattr_init(3T), pthread_rwlock_init(3T).
STANDARDS CONFORMANCE
Pthread Library pthread_rwlockattr_getpshared(3T)