X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; q=dns; s=default; b=HK jqUV2bRqNeAAdgSnpYrh+dqZo3UTLcp4ShU5Gqc2a8yqIGDHuCzk3IeX2kVGizeg iHZiP+Ge1LGVczqDPVTObmg67BY/DQeTpDxTyt+mS3pwDvoG707XyJckeC3ExBPx cAtpTo4ufrENUVLS5WDrPHOSfxJcJtJAojLmQunw0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; s=default; bh=7P7i87F+ wX2+1qk0jZmCOhvsqis=; b=rUVNgI5TWU2Jb2/czDyNCexfdjc1HSUcZZC6netG T4vCrd+AK0KNLFstbuov95/fh+uK9y2m++JiTtzzf3MbZFAq7MyM636PmwwOvpPc ohgn/G4wpQnt8VhosORTLje3jzGnIWhO2qzDeJgmzKo3ogY5J77+ecwE6RYeDZgu ZxM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=3321, Pant, 2321, cygport X-HELO: mail-wm0-f45.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=nhJ8YgYDS8SJEp3DaU7qE9ZhUJ8iyBoC431afe6Vypk=; b=L/UPAfHaUXbdAcuTo/fI/SQGfyx9Z1mpLxavwyJ/PZc1wABz8Qwr6ACeQD0d5F3pdq E5CQZYAUI3KUXYNAkBut7RrwZp+4Rr3CjQ++SdDpTTIfIaGuXA9piOttVKvLsT6ft/BH TLyomKAH+iTYkL9feFqskm6IprvCefT7fPiQDLYQZ71iHCzcVjzfuX3lPODgG5GHKUAP qljtHL77SYF4ma3hGAoVMsumCra1CvW/Efj5j0O4yXMWIk4n6+X29TVQtjNN9ddd8SaW NTSB3s4Nn137/E56zIg3ItuWYii/QWixjlHa66UoaOKd/PIv2hMZYkIkYV0oZ5N+F21z JBug== X-Gm-Message-State: AD7BkJLYxeNwalI2464DXrXMBrAHcrpypNVhCynkvuu6Gg8lmAMXdR1xmAD1ShmxkCkZEEh/rw4We+kmdD8Skg== MIME-Version: 1.0 X-Received: by 10.194.112.98 with SMTP id ip2mr9178571wjb.24.1457693575767; Fri, 11 Mar 2016 02:52:55 -0800 (PST) In-Reply-To: References: Date: Fri, 11 Mar 2016 16:22:55 +0530 Message-ID: Subject: Re: SEMCTL fails with error 22 From: Meenakshi Pant To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes For me the out put is when cygserver is up. Semaphore Test Semaphore created successfully 196608 Value before errno = 0 Cannot set semaphore value.errno = 22 When cygserver is down the output is Semaphore Test Unable to obtain semaphore 88 After bringing up cygserver the command 'cygcheck -c' shows the below output. Cygwin Package Information Package Version Status _autorebase 001003-1 OK adwaita-icon-theme 3.18.0-1 OK alternatives 1.3.30c-10 OK autoconf 13-1 OK autoconf2.1 2.13-12 OK autoconf2.5 2.69-3 OK automake 9-1 OK automake1.10 1.10.3-2 OK automake1.11 1.11.6-2 OK automake1.12 1.12.6-2 OK automake1.13 1.13.4-1 OK automake1.14 1.14.1-2 OK automake1.15 1.15-1 OK automake1.4 1.4p6-11 OK automake1.5 1.5-11 OK automake1.6 1.6.3-12 OK automake1.7 1.7.9-11 OK automake1.8 1.8.5-11 OK automake1.9 1.9.6-11 OK base-cygwin 3.8-1 OK base-files 4.2-4 OK bash 4.3.42-4 OK bashdb 3.1_0.09-1 OK binutils 2.25-4 OK bison 3.0.4-1 OK byacc 20150711-1 OK bzip2 1.0.6-2 OK ca-certificates 2.6-1 OK cccc 3.1.4-1 OK clang 3.7.1-1 OK cmake 3.3.2-1 OK cmake-doc 3.3.2-1 OK cmake-gui 3.3.2-1 OK coreutils 8.25-1 OK crypt 1.2-1 OK csih 0.9.9-1 OK cvs 1.11.23-2 OK cvsutils 0.2.6-1 OK cygport 0.20.2-1 OK cygrunsrv 1.62-1 OK cygutils 1.4.15-2 OK cygwin 2.4.1-1 OK cygwin-debuginfo 2.4.1-1 OK cygwin-devel 2.4.1-1 OK dash 0.5.8-3 OK desktop-file-utils 0.22-1 OK diffstat 1.60-1 OK diffutils 3.3-3 OK dos2unix 7.3.3-1 OK dri-drivers 11.0.9-2 OK editrights 1.03-1 OK file 5.25-1 OK findutils 4.5.12-1 OK flac-devel 1.3.1-1 OK flex 2.5.39-1 OK flexdll 0.34-1 OK gamin 0.1.10-15 OK gawk 4.1.3-1 OK gcc-core 5.3.0-3 OK gcc-g++ 5.3.0-3 OK gcc-objc 5.3.0-3 OK gcc-objc++ 5.3.0-3 OK getent 2.18.90-4 OK grep 2.21-2 OK groff 1.22.3-1 OK gsettings-desktop-schemas 3.18.1-1 OK gtk-update-icon-cache 3.18.7-1 OK gzip 1.6-1 OK hicolor-icon-theme 0.12-1 OK hostname 3.13-1 OK info 6.1-2 OK ipc-utils 1.0-1 OK kbproto 1.0.7-1 OK less 481-1 OK lftp 4.6.5-1 OK libarchive13 3.1.2-3 OK libargp 20110921-2 OK libatk1.0_0 2.18.0-1 OK libatomic1 5.3.0-3 OK libattr-devel 2.4.46-1 OK libattr1 2.4.46-1 OK libblkid1 2.25.2-2 OK libboost-devel 1.58.0-1 OK libboost_atomic1.58 1.58.0-1 OK libboost_chrono1.58 1.58.0-1 OK libboost_container1.58 1.58.0-1 OK libboost_context1.58 1.58.0-1 OK libboost_coroutine1.58 1.58.0-1 OK libboost_date_time1.58 1.58.0-1 OK libboost_filesystem1.58 1.58.0-1 OK libboost_graph1.58 1.58.0-1 OK libboost_iostreams1.58 1.58.0-1 OK libboost_locale1.58 1.58.0-1 OK libboost_log1.58 1.58.0-1 OK libboost_math1.58 1.58.0-1 OK libboost_program_options1.58 1.58.0-1 OK libboost_random1.58 1.58.0-1 OK libboost_regex1.58 1.58.0-1 OK libboost_serialization1.58 1.58.0-1 OK libboost_signals1.58 1.58.0-1 OK libboost_system1.58 1.58.0-1 OK libboost_test1.58 1.58.0-1 OK libboost_thread1.58 1.58.0-1 OK libboost_timer1.58 1.58.0-1 OK libboost_wave1.58 1.58.0-1 OK libbz2-devel 1.0.6-2 OK libbz2_1 1.0.6-2 OK libcairo2 1.14.4-1 OK libcharset1 1.14-3 OK libclang3.7 3.7.1-1 OK libcloog-isl4 0.18.0-2 OK libcom_err2 1.42.12-2 OK libcurl4 7.47.1-1 OK libdatrie1 0.2.8-1 OK libdb4.8 4.8.30-1 OK libdbus1_3 1.8.16-1 OK libedit0 20130712-1 OK libEGL1 11.0.9-2 OK libexpat1 2.1.0-3 OK libfam0 0.1.10-15 OK libffi6 3.2.1-1 OK libFLAC++6 1.3.1-1 OK libFLAC8 1.3.1-1 OK libfontconfig1 2.11.1-3 OK libfreetype-devel 2.5.5-2 OK libfreetype6 2.5.5-2 OK libgcc1 5.3.0-3 OK libgcrypt20 1.6.4-1 OK libgdbm4 1.8.3-20 OK libgdk_pixbuf2.0_0 2.32.2-1 OK libgif-devel 4.1.6-10 OK libgif4 4.1.6-10 OK libGL1 11.0.9-2 OK libglapi0 11.0.9-2 OK libglib2.0_0 2.46.2-2 OK libgmp10 6.1.0-3p1 OK libgnutls28 3.3.17-1 OK libgomp1 5.3.0-3 OK libgpg-error0 1.19-1 OK libgraphite2_3 1.3.6-1 OK libgssapi_krb5_2 1.13.2-4 OK libgtk2.0_0 2.24.29-1 OK libguile17 1.8.8-1 OK libharfbuzz0 1.0.6-1 OK libhogweed2 2.7-2 OK libICE-devel 1.0.9-1 OK libICE6 1.0.9-1 OK libiconv 1.14-3 OK libiconv-devel 1.14-3 OK libiconv2 1.14-3 OK libicu-devel 56.1-1 OK libicu56 56.1-1 OK libidn11 1.29-1 OK libintl-devel 0.19.5.1-2 OK libintl8 0.19.5.1-2 OK libisl10 0.11.1-2 OK libisl13 0.14.1-1 OK libjasper1 1.900.1-15 OK libjbig2 2.0-14 OK libjpeg-devel 1.4.2-1 OK libjpeg8 1.4.2-1 OK libk5crypto3 1.13.2-4 OK libkrb5_3 1.13.2-4 OK libkrb5support0 1.13.2-4 OK liblcms-devel 1.19-5 OK liblcms1 1.19-5 OK libllvm3.7 3.7.1-1 OK libltdl7 2.4.6-3 OK liblzma5 5.2.2-1 OK liblzo2_2 2.08-1 OK libming-devel 0.4.7-1 OK libming1 0.4.7-1 OK libmng-devel 1.0.10-4 OK libmng1 1.0.10-4 OK libmpc3 1.0.3-1 OK libmpfr4 3.1.4-1 OK libncurses-devel 6.0-4.20160305 OK libncurses10 5.9-20150530-1 OK libncursesw10 6.0-4.20160305 OK libnettle4 2.7-2 OK libnghttp2_14 1.7.1-1 OK libobjc4 5.3.0-3 OK libogg-devel 1.3.1-1 OK libogg0 1.3.1-1 OK libopenldap2_4_2 2.4.42-1 OK libopenssl100 1.0.2g-3 OK libp11-kit0 0.22.1-1 OK libpango1.0_0 1.38.1-1 OK libpcre1 8.38-2 OK libpcre16_0 8.38-2 OK libpipeline1 1.4.0-1 OK libpixman1_0 0.32.8-1 OK libpng-devel 1.6.20-1 OK libpng16 1.6.20-1 OK libpng16-devel 1.6.20-1 OK libproxy1 0.4.11-5 OK libpsl5 0.12.0-1 OK libQt5Core5 5.5.1-1 OK libQt5Gui5 5.5.1-1 OK libquadmath0 5.3.0-3 OK libreadline7 6.3.8-1 OK libsasl2_3 2.1.26-9 OK libsigsegv2 2.10-2 OK libSM-devel 1.2.2-1 OK libSM6 1.2.2-1 OK libsmartcols1 2.25.2-2 OK libsqlite3_0 3.11.0-2 OK libssh2_1 1.7.0-1 OK libssp0 5.3.0-3 OK libstdc++6 5.3.0-3 OK libtasn1_6 4.7-1 OK libthai0 0.1.21-1 OK libtiff6 4.0.6-1 OK libtool 2.4.6-3 OK libunistring2 0.9.6-1 OK libuuid-devel 2.25.2-2 OK libuuid1 2.25.2-2 OK libvtv0 5.3.0-3 OK libX11-devel 1.6.3-1 OK libX11-xcb1 1.6.3-1 OK libX11_6 1.6.3-1 OK libXau-devel 1.0.8-1 OK libXau6 1.0.8-1 OK libxcb-devel 1.11.1-1 OK libxcb-glx0 1.11.1-1 OK libxcb-icccm4 0.4.1-1 OK libxcb-image0 0.3.9-1 OK libxcb-keysyms1 0.3.9-1 OK libxcb-randr0 1.11.1-1 OK libxcb-render-util0 0.3.9-1 OK libxcb-render0 1.11.1-1 OK libxcb-shape0 1.11.1-1 OK libxcb-shm0 1.11.1-1 OK libxcb-sync1 1.11.1-1 OK libxcb-util1 0.3.9-1 OK libxcb-xfixes0 1.11.1-1 OK libxcb-xkb1 1.11.1-1 OK libxcb1 1.11.1-1 OK libXcomposite1 0.4.3-1 OK libXcursor1 1.1.14-1 OK libXdamage1 1.1.4-1 OK libXdmcp-devel 1.1.2-1 OK libXdmcp6 1.1.2-1 OK libXext6 1.3.3-1 OK libXfixes3 5.0.1-1 OK libXft2 2.3.2-1 OK libXi6 1.7.6-1 OK libXinerama1 1.1.3-1 OK libxkbcommon0 0.4.3-1 OK libxml2 2.9.3-1 OK libXrandr2 1.5.0-1 OK libXrender1 0.9.9-1 OK libxslt 1.1.28-2 OK lndir 1.0.3-1 OK login 1.11-1 OK lynx 2.8.7-1 OK m4 1.4.17-2 OK make 4.1-1 OK man-db 2.7.4-1 OK mingw-binutils 2.23.1-1 OK mingw-gcc-core 4.7.3-1 OK mingw-libgcrypt 1.4.6-1 OK mingw-libgcrypt-devel 1.4.6-1 OK mingw-libgcrypt11 1.4.6-1 OK mingw-libgpg-error-devel 1.10-1 OK mingw-libgpg-error0 1.10-1 OK mingw-pthreads 20110507-2 OK mingw-runtime 4.0-1 OK mingw-w32api 4.0-1 OK mingw64-i686-binutils 2.25.0.1.23f238d-1 OK mingw64-i686-dbus 1.8.20-1 OK mingw64-i686-dbus-glib 0.102-1 OK mingw64-i686-expat 2.1.0-2 OK mingw64-i686-gcc-core 4.9.2-2 OK mingw64-i686-gcc-g++ 4.9.2-2 OK mingw64-i686-gconf2 3.2.6-1 OK mingw64-i686-gconfmm2.6 2.28.2-2 OK mingw64-i686-gettext 0.19.5.1-1 OK mingw64-i686-glib2.0 2.46.2-1 OK mingw64-i686-glibmm2.4 2.46.2-1 OK mingw64-i686-headers 4.0.5-1 OK mingw64-i686-libffi 3.2.1-1 OK mingw64-i686-libgnurx 2.5-3 OK mingw64-i686-libsigc++2.0 2.6.2-1 OK mingw64-i686-libxml2 2.9.3-1 OK mingw64-i686-ncurses 6.0-4.20160305 OK mingw64-i686-pkg-config 0.28-1 OK mingw64-i686-runtime 4.0.5-1 OK mingw64-i686-win-iconv 0.0.6-2 OK mingw64-i686-windows-default-manifest 6.4-1 OK mingw64-i686-winpthreads 4.0.5-1 OK mingw64-i686-xz 5.2.1-1 OK mingw64-i686-zlib 1.2.8-4 OK mintty 2.2.3-0 OK ncurses 6.0-4.20160305 OK openssh 7.2p1-1 OK openssl 1.0.2g-3 OK p11-kit 0.22.1-1 OK p11-kit-trust 0.22.1-1 OK patch 2.7.4-1 OK perl 5.22.1-1 OK perl-Carp 1.38-1 OK perl-Encode-Locale 1.05-1 OK perl-File-Listing 6.04-5 OK perl-HTML-Parser 3.72-1 OK perl-HTML-Tagset 3.20-5 OK perl-HTTP-Cookies 6.01-5 OK perl-HTTP-Daemon 6.01-5 OK perl-HTTP-Date 6.02-5 OK perl-HTTP-Message 6.11-1 OK perl-HTTP-Negotiate 6.01-5 OK perl-IO-HTML 1.001-2 OK perl-libwww-perl 6.15-1 OK perl-LWP-MediaTypes 6.02-5 OK perl-Net-HTTP 6.09-1 OK perl-Pod-Simple 3.32-1 OK perl-Unicode-Normalize 1.25-1 OK perl-URI 1.71-1 OK perl-WWW-RobotRules 6.02-5 OK perl-XML-Parser 2.44-2 OK perl_autorebase 5.22.1-1 OK perl_base 5.22.1-1 OK pkg-config 0.29-1 OK popt 1.16-1 OK python 2.7.10-1 OK python-beautifulsoup 3.2.1-1 OK python-chardet 2.2.1-1 OK python-lxml 3.4.4-1 OK python-setuptools 15.2-1 OK rcs 5.9.4-1 OK rcs-debuginfo 5.9.4-1 OK rebase 4.4.1-1 OK rsync 3.1.2-1 OK run 1.3.4-2 OK sed 4.2.2-3 OK shared-mime-info 1.6-2 OK tar 1.28-1 OK terminfo 6.0-4.20160305 OK texinfo 6.1-2 OK tzcode 2016a-1 OK unzip 6.0-15 OK util-linux 2.25.2-2 OK vim-minimal 7.4.1506-1 OK w32api-headers 4.0.4-1 OK w32api-runtime 4.0.4-1 OK wget 1.17.1-1 OK which 2.20-2 OK windows-default-manifest 6.4-1 OK xkeyboard-config 2.17-1 OK xproto 7.0.28-1 OK xz 5.2.2-1 OK zlib-devel 1.2.8-3 OK zlib0 1.2.8-3 OK Thanks On Fri, Mar 11, 2016 at 3:49 PM, Meenakshi Pant wrote: > Hi, > > My program creates a semaphore, but moving further the SEMCTL function > is failing with error 22 with the latest CYGWIN 2.4. The cygserver is > up. > > Below is the simplified code as a test case.It fails with the same > error as my original program. > > /* semtest.c - program to test semaphore */ > > #include > #include > #include > #include > #include > #include > extern int errno; > #define KEY (1492) > > void main() > { > int id; > > printf("\n Semaphore Test"); > > union semun { > int val; > struct semid_ds *buf; > ushort * array; > } argument; > > argument.val = 0; > > id = semget(KEY, 1, 0666 | IPC_CREAT); > > if(id < 0) > { > printf("\n Unable to obtain semaphore %d ", errno); > exit(0); > } > > printf("\n Semaphore created successfully %d ", id); > printf("\n Value before errno = %d", errno ); > > errno = 0; > > if( semctl(id, 0, SETVAL, argument) < 0) > { > printf("\nCannot set semaphore value.errno = %d", errno ); > } > else > { > printf("Semaphore %d initialized.\n", KEY); > } > } > > > > > Thanks -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple