Hi everyone. I asked once here and it went well, so I'm very happy with this community.
I have a new question to ask. I would like to read&write specify memory of a process which is not the process I'm doing it from, nor a child nor a parent.
So, I want to do a program similar to Cheat Engine. I already have done the speed hack module (thank you unix.com!), and now I'm going to start with memory modifying part.
First of all, I need to know how to read (and write) bytes from (and to) another process. In windows API those are (Read)&(Write)ProcessMemory I guess.
Second, I need to know which are the readable regions so I can do a full snapshot of all the readable memory of an application.
If you need to know the OS target:
Thank you again for read.
I am looking for C program source code. Could you please help me in finding the source code required mentioned below.
program to create multiple threads (one master thread and rest worker threads) and using the threads write into and read from shared memory
Restrictions:
Only one thread... (2 Replies)
I've done this in the past, but I didn't save the syntax. I'm still kicking myself about that...
I am trying to mount \\server_name\share_name for read/write under CentOS 5.2 (a "generic" version of RedHat). As I recall, there was a fairly simple (maybe a oneline) command that would allow NTFS... (2 Replies)
I'm doing server maintainence to a HP UX server and I have 2 files that someone need for an unknown reason. I was wondering If I can put this files on a memory stick, or is there someother way I have to copy it for them? (3 Replies)
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)
I created a shared memory and attached it. I also created the appropriate semaphores to sync. my read/write operations. However I do not know how am I supposed to do so. Anyone has got any ideas? I want to write int the form of 1234:23:444:... where each number between : means something to the... (0 Replies)
I have created and attached a shared memory segment. However I do not know how am I supposed to write and read data from it. I want to save various different data on this segment such as process IDs and other. Do you know how am I supposed to write these and be able to read such data in the correct... (1 Reply)
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)
Hi ,
I am new to this scripting , I am facing an issue like how to read different values from external file by using different variables,
In script I supposed to declare
var 1
var 2
var 3
I know how to call this variables from external file (I am using awk command by giving same... (3 Replies)
I use the following as an example. I find myself always doing this and I believe my scripts would run much faster if I put the sed results into a place in memory rather than writing to files. Again, its not about sed, its about redirecting to a place in memory rather than an external file.
... (5 Replies)
Hi all,
I have a moderate size (300 lines) BASH Shell script that performs various tasks on different source reports (CSV files). One of the tasks that it performs, is to use SED to replace 'non-conforming' titles with conformant ones. For example "How to format a RAW Report" needs to become... (3 Replies)
Discussion started by: richardsantink
3 Replies
LEARN ABOUT HPUX
pthread_rwlock_destroy
pthread_rwlock_init(3T)pthread_rwlock_init(3T)NAME
pthread_rwlock_init(), pthread_rwlock_destroy() - initialize or destroy a read-write lock
SYNOPSIS PARAMETERS
rwlock Pointer to the read-write lock to be initialized or destroyed.
attr Pointer to the attributes object that defines the characteristics of the read-write lock to be initialized. If the
pointer is NULL, default attributes are used.
DESCRIPTION
initializes the read-write lock referenced by rwlock with the attributes attr. If attr is NULL, the default read-write lock attributes are
used. Upon successful initialization, the state of the read-write lock becomes initialized and unlocked. Attempting to initialize an
already initialized read-write lock object results in undefined behavior.
The macro can be used to initialize read-write locks which are statically allocated. The effect is equivalent to dynamic initialization by
a call to with the attr parameter specified as NULL, except that no error checks are performed. The read-write lock will be initialized
with default attributes.
If the process-shared attribute in the read-write lock attributes object referenced by attr is defined as the read-write lock must be allo-
cated such that the processes sharing the read-write lock has access to it. This may be done through the memory-mapping functions (see
mmap(2)) or shared memory functions (see shmget(2)).
destroys the read-write referenced by rwlock. This function may set rwlock to an invalid value. The destroyed read-write lock can be
reinitialized using the function If the read-write lock is referenced after destruction in any read-write lock call, the resulting behavior
is undefined.
A read-write lock should be destroyed only when no threads are currently using it. Destroying a read-write lock which is currently in use
results in undefined behavior.
RETURN VALUE
Upon successful completion, and returns zero. Otherwise, an error number is returned to indicate the error (the variable is not set).
ERRORS
If any of the following occur, the function returns the corresponding error number:
The necessary resources (other than memory) to initialize
rwlock are not available.
rwlock is an already initialized read-write lock. However, getting for reinitializing the rwlock cannot be expected all the
time since the behavior of reinitializing the rwlock is undefined.
The value specified by
rwlock or attr is invalid.
There is insufficient memory available in which to initialize the
read-write lock rwlock.
The caller does not have the privilege to perform the operation.
If any of the following occur, the function returns the corresponding error number:
rwlock is currently locked or being used by other threads.
The value specified by
rwlock is invalid.
WARNINGS
The space for the read-write lock must to be allocated before calling Undefined behavior may result if the process-shared attribute of attr
is and the space allocated for the read-write lock is not accessible to cooperating threads.
AUTHOR
and were developed by X/Open.
SEE ALSO pthread_rwlock_rdlock(3T), pthread_rwlock_tryrdlock(3T), pthread_rwlock_trywrlock(3T), pthread_rwlock_unlock(3T),
pthread_rwlock_wrlock(3T).
STANDARDS CONFORMANCE
Pthread Library pthread_rwlock_init(3T)