Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] shmget fails with error code = 22
- Date: Tue, 15 Jan 2008 22:13:38 +0900 (東京 (標準時))
- From: Masanori ITOH <kgd00742@example.com>
- Subject: Re: [tlug] shmget fails with error code = 22
- References: <78d7dd350801150332o4682b307pdac1e74a8b102771@mail.gmail.com>
Hi, In a typical case, shmget() returns EINVAL when the second parameter(size) is invalid. But, anyway make sure ShmKey and mem_size are correct as Takeshi pointed out. Regards, Masanori From: "Nguyen Vu Hung" <vuhung16plus@example.com> Subject: [tlug] shmget fails with error code = 22 Date: Tue, 15 Jan 2008 20:32:50 +0900 > 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)
- Follow-Ups:
- Re: [tlug] shmget fails with error code = 22
- From: Nguyen Vu Hung
- References:
- [tlug] shmget fails with error code = 22
- From: Nguyen Vu Hung
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] shmget fails with error code = 22
- Next by Date: Re: [tlug] [Announcement] TLUG Technical Meeting 2008-01-12 - update
- Previous by thread: [solved] Re: [tlug] shmget fails with error code = 22
- Next by thread: Re: [tlug] shmget fails with error code = 22
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links