Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] shmget fails with error code = 22



Hi,

The following code has failed and the error code ( errno ) is 22.


        shmid = shmget((key_t)ShmKey, (size_t)mem_size, 0666 | IPC_CREAT);
        iErrorCode = errno;


I've checked /usr/include/asm/error.h and found that

#define EINVAL      22  /* Invalid argument */

which is not very informative.

The thing I don't know is: what argument is invalid? This code runs
"tamatama" almost perfect until today.

A reboot resolves the problem.

[vuhung@example.com ]$uname -a
Linux vuhung 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 GNU/Linux
[vuhung@example.com ]$cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 4)
[vuhung@example.com ]$gcc --version  | grep GCC
gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)



-- 
Best Regards,
Nguyen Hung Vu ( Nguyễn Vũ Hưng )
vuhung16plus{remove}@example.com
An inquisitive look at Harajuku
http://www.flickr.com/photos/vuhung/sets/72157600109218238/

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links