8000 error hanlding · Issue #10 · ghetzel/shmtool · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
error hanlding #10
Open
Open
@mike1821

Description

@mike1821

Hello,

We are having some issues in our deployments with shmctl command. I would like to add the following errno switch in

size_t sysv_shm_get_size(int shm_id) {
to help me identify the root cause.

e.g.
int sysv_shm_get_size(int shm_id) {
struct shmid_ds shm;

if(shmctl(shm_id, IPC_STAT, &shm) >= 0) {
    return shm.shm_segsz;
}else{
    switch(errno)
    {
        case EACCES:
            return -1;
        case EFAULT:
            return -2;
        case EIDRM:
            return -3;
        case EINVAL :
            return -4;
        case ENOMEM :
            return -5;
        case EOVERFLOW:
            return -6;
        case EPERM:
            return -7;
        default:
            return 0;
    }
}

}

Would you accept this as pull request and if you do, could you please let me know how I can push in a remote branch on your repo. I tried to create a pull request, but I am getting an access denied error.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0