Sponsored Content
Full Discussion: invalid argument in semctl()
Top Forums UNIX for Advanced & Expert Users invalid argument in semctl() Post 302319796 by fpmurphy on Tuesday 26th of May 2009 08:24:11 AM
Old 05-26-2009
Can you be more specfic? By 'invalid argument" do you mean EINVAL? What command (i.e the 3rd argument to semctl()) were you attempting?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

stty: : Invalid argument

Hello Everyone; I have a script that is throwing the following message: stty: : Invalid argument The line that gives the message is the following, sailormoon$ scp home/voice.xml newwave@silvermoon:/newwave/config/radius stty: : Invalid argument voice.xml | ... (2 Replies)
Discussion started by: tony3101
2 Replies

2. Solaris

ps: 65535 is an invalid non-numeric argument for -p option

I want to figure out what is the reason of error message I have in Solaris 10. Why Solaris 10 dosn't recognize 65535? ps: 65535 is an invalid non-numeric argument for -p option usage: ps 'format' is one or more of: Thank you (5 Replies)
Discussion started by: gogogo
5 Replies

3. Programming

error "Invalid argument" returned after call sched_setscheduler

the code is below and the was run on Solaris 9. ----------------------------- struct sched_param param; param.sched_priority = 99; if(sched_setscheduler(0, SCHED_RR, &param) == -1) { perror("setting priority"); exit(1); } ------------------------------- after the... (1 Reply)
Discussion started by: robin.zhu
1 Replies

4. UNIX for Dummies Questions & Answers

msgrcv : Invalid argument

Hi All, Please guide me how to get rid : msgrcv : Invalid argument. I am using message queues: msgsnd and msgrcv, I am able to send through msgsnd and receive through msgrcv, but at times i get the belo error. msgrcv : Invalid argument. (1 Reply)
Discussion started by: answers
1 Replies

5. Solaris

Invalid Argument and glassfish

I tried to install glassfish on Solaris 10 and it worked fine on other instances. I got the below message bash-3.00# ./sjsas-9_1_01-solaris-sparc.bin -console bash: ./sjsas-9_1_01-solaris-sparc.bin: Invalid argument I logged on as root and the file has execute permission. So strange. Do... (1 Reply)
Discussion started by: Andrew2008
1 Replies

6. IP Networking

sendto invalid argument

Hi I lost a lot of time in understanding the message "sendto Invalid argument" when I execute the following code. This code is a simple UDP sender improved with some reliability feature. My goal is to send a file. I've reported only the code which may be useful. Can anyone help me? Thank you... (0 Replies)
Discussion started by: Puntino
0 Replies

7. UNIX for Dummies Questions & Answers

Need FIX for: RTNETLINK answers: Invalid argument

OK...I'm using the latest version of Fedora 10. My network connection was working fine, and I had several network LAN shares on my desktop. Then I rebooted the system without dismounting those shares first. ooops. <:( ...When the system came back up, my network connection was gone. All... (2 Replies)
Discussion started by: Pudnik
2 Replies

8. Programming

SIOCSARP: Invalid Argument.

Hello everybody, I've been programming an alternative to linux's standard 'arp' program. I can delete arp entries (SIOCDARP), get arp entries (SIOCGARP), but i'm having troubles setting entries with ioctl. I can't set any PERM, USETRAILERS, or COM address. It only adds PUB entries and i don't... (2 Replies)
Discussion started by: semash!
2 Replies

9. UNIX for Advanced & Expert Users

NFS : Invalid argument (Remote share mounting issue)

Hi Guru's, I am unable to mount NFS share on unix system (DG/UX) which is nfs client. Error: mount: /nfsshare: Invalid argument mount: giving up on: /mountpoint i tried following command mount -t nfs remotehost:/nfsshare /mountpoint Error: (5 Replies)
Discussion started by: Justin John
5 Replies

10. UNIX for Beginners Questions & Answers

Mount error in Linux: invalid argument

hi i have an android phone which i think is bricked, so wanted to see what the actual issue is, I flashed it with TWRP recovery image and launched terminal i, was able understand that mount is not happening, it says invalid argument and no such file or directory. Below is what i get while... (32 Replies)
Discussion started by: nanz143
32 Replies
SEMCTL(2)						      BSD System Calls Manual							 SEMCTL(2)

NAME
semctl -- control operations on a semaphore set LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <sys/ipc.h> #include <sys/sem.h> int semctl(int semid, int semnum, int cmd, ...); DESCRIPTION
The semctl() system call performs the operation indicated by cmd on the semaphore set indicated by semid. A fourth argument, a union semun arg, is required for certain values of cmd. For the commands that use the arg argument, union semun is defined as follows: union semun { int val; /* value for SETVAL */ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ u_short *array; /* array for GETALL & SETALL */ }; Commands are performed as follows: IPC_STAT Fetch the semaphore set's struct semid_ds, storing it in the memory pointed to by arg.buf. IPC_SET Changes the sem_perm.uid, sem_perm.gid, and sem_perm.mode members of the semaphore set's struct semid_ds to match those of the struct pointed to by arg.buf. The calling process's effective uid must match either sem_perm.uid or sem_perm.cuid, or it must have superuser privileges. IPC_RMID Immediately removes the semaphore set from the system. The calling process's effective uid must equal the semaphore set's sem_perm.uid or sem_perm.cuid, or the process must have superuser privileges. GETVAL Return the value of semaphore number semnum. SETVAL Set the value of semaphore number semnum to arg.val. Outstanding adjust on exit values for this semaphore in any process are cleared. GETPID Return the pid of the last process to perform an operation on semaphore number semnum. GETNCNT Return the number of processes waiting for semaphore number semnum's value to become greater than its current value. GETZCNT Return the number of processes waiting for semaphore number semnum's value to become 0. GETALL Fetch the value of all of the semaphores in the set into the array pointed to by arg.array. SETALL Set the values of all of the semaphores in the set to the values in the array pointed to by arg.array. Outstanding adjust on exit values for all semaphores in this set, in any process are cleared. The struct semid_ds is defined as follows: struct semid_ds { struct ipc_perm sem_perm; /* operation permission struct */ struct sem *sem_base; /* pointer to first semaphore in set */ u_short sem_nsems; /* number of sems in set */ time_t sem_otime; /* last operation time */ long sem_pad1; /* SVABI/386 says I need this here */ time_t sem_ctime; /* last change time */ /* Times measured in secs since */ /* 00:00:00 GMT, Jan. 1, 1970 */ long sem_pad2; /* SVABI/386 says I need this here */ long sem_pad3[4]; /* SVABI/386 says I need this here */ }; RETURN VALUES
On success, when cmd is one of GETVAL, GETPID, GETNCNT or GETZCNT, semctl() returns the corresponding value; otherwise, 0 is returned. On failure, -1 is returned, and errno is set to indicate the error. ERRORS
The semctl() system call will fail if: [EINVAL] No semaphore set corresponds to semid. [EINVAL] The semnum argument is not in the range of valid semaphores for given semaphore set. [EPERM] The calling process's effective uid does not match the uid of the semaphore set's owner or creator. [EACCES] Permission denied due to mismatch between operation and mode of semaphore set. [ERANGE] SETVAL or SETALL attempted to set a semaphore outside the allowable range [0 .. SEMVMX]. SEE ALSO
semget(2), semop(2) BUGS
SETALL may update some semaphore elements before returning an error. BSD
September 12, 1995 BSD
All times are GMT -4. The time now is 09:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy