You are dereferencing a null pointer:
According to the language definition, the behaviour is undefined if you do this, so that's why you have different behaviour on different platforms.
In order to make your code run correctly, you need to either remove the lines
or remove the function call
I have a need to allow only certain IP addresses to access a machine running solaris 9. I am not sure how this can be accomplished.
Thanks in advance for your help.
Patch (2 Replies)
Hi, I try to marshal a unsigned int and a char * into a buffer, and then unmarshal them later to get them out. I need to put the char * in the front and unsigned int at the end of the buffer. However, my system always give me "BUS ERROR". I am using Sun Sparcs Sloris 2.10.
My code to marshal... (6 Replies)
Hi,
The following error message occured when I was trying to reboot my SUN machine:
Memory address not aligned
Its a Sun 280 R , Ultra SPARC III
What should I do.
Varma (3 Replies)
Hi All
i need to use RSH ( i can hear you all banging your head against a wall ) but i want to block a certain IP address from access my machine via RSH, is there way to do this
thanks
A (3 Replies)
HI,
I'm doing a research on client/server connection. I need to run the server code to open socket connection with the client code. To make the test real, I need to run the server code from a a machine far away from the client over the Internet. IN ORDER TO RUN THE CODE, the client has to know the... (3 Replies)
We want to disable graphical logins on our Solaris 10(64bit sparc )boxes, but I haven't found any information on how to do it via google. Most likely I am using the wrong search terms (i've been looking for "xdmcp" and "x11" "disable") .
While looking through the output of "svcs -a | grep... (3 Replies)
Hello Everyone,
We plan to restrict all RSS news feed access soon based on IP address. This means that if you have a website or application that using our site RSS feeds, you can still do it; but your must register you site in this thread.
So please reply with your IP address of your server... (7 Replies)
Discussion started by: Neo
7 Replies
9. Post Here to Contact Site Administrators and Moderators
Hello Everyone,
We now (only) permit access to our RSS news feed access based on IP address. This means that if you have a website or application that using our site RSS feeds, you can still do it; but your must register you site in this thread.
So please reply with your IP address of your... (9 Replies)
How would I write a value to a physical memory address?
I was able to read a physical memory address (for example, 0x400) using this line:
dd if=/dev/mem count=4 bs=1 skip=$(( 0x400 ))
But I get an error:
dd: 'standard input': cannot skip to specified offset
when I try to write using... (1 Reply)
Discussion started by: rabrandt
1 Replies
LEARN ABOUT HPUX
msem_init
msem_init(2) System Calls Manual msem_init(2)NAME
msem_init - initialize a semaphore in a mapped file or anonymous memory region
SYNOPSIS DESCRIPTION
allocates a new binary semaphore and initializes the state of the new semaphore.
sem points to an structure in which the state of the semaphore is to be stored.
If initial_value is the new semaphore is initialized in the locked state. If initial_value is the new semaphore is initialized in the
unlocked state.
The structure must be located within a mapped file or anonymous memory region created by a successful call to and have both read and write
access.
If a semaphore is created in a mapped file region, any reference by a process that has mapped the same file, using a pointer that resolves
to the same file offset is interpreted as a reference to the same semaphore. If a semaphore is created in an anonymous memory region, any
reference by a process sharing the same region by use of a pointer that resolves to the same offset from the start of the region is inter-
preted as a reference to the same semaphore.
Any previous semaphore state stored in the structure will be ignored and overwritten.
Implementation Notes
In order to ensure that an structure is entirely contained in a single memory page, sem must be at an address that is an exact multiple of
The size of the structure is guaranteed to prevent semaphores that cross page boundaries given the above restriction.
For a memory mapped file region, the system deallocates memory that corresponds to a range of the file that has been truncated with or If a
semaphore is located in memory so deallocated, the effect is equivalent to an on the semaphore.
RETURN VALUE
returns the address of the initialized structure; otherwise, it returns NULL and sets to indicate the error.
ERRORS
fails if any of the following conditions are encountered:
sem points to an structure that is not located in a mapped region created by and with read and write access, or ini-
tial_value is not valid.
A new semaphore could not be created.
sem is an invalid pointer.
AUTHOR
was developed by HP and OSF.
SEE ALSO mmap(2), msem_lock(2), msem_remove(2), msem_unlock(2), mman(5).
STANDARDS CONFORMANCE msem_init(2)