A message block is formed with the new message-block descriptor pointing to the same data block as the original descriptor. The dupb utility does not copy the data buffer, only the message-block descriptor. Message blocks that exist on different queues can reference the same data block. In general, if the contents of a message block with a reference count greater than 1 are to be modified, the copymsg utility should be used to create a new message block. Only the new message block should be modified to ensure that other references to the original message block are not invalidated by unwanted changes.
Parameters bp Contains a pointer to the message-block descriptor to be copied.
On successful compilation, the dupb utility returns a pointer to the new message block. If the dupb utility cannot allocate a new message-block descriptor, it returns a null pointer. The copymsg utility, dupmsg utility.