delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2023/02/06/23:46:07

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CB393858C39
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1675745111;
bh=R1/H/GMaerP4M8xj04ok46R02LXMzYQFZ+AtLy3mvfQ=;
h=Date:Subject:To:Cc:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=wEFdYFZ3NxBMnIBLMRF+RoiMc3Z8jB08rTpyQ3e2ZetKG/hiLXtzqp71GbXwKtIoJ
6vgYgKuAeq5MwB9N0KqsA2Gs2DoEJ8VU+EYJozgLldrxrcXGOv6Jghj8r7Kg5N9Sm4
IBy3ZfV9rMo885HdJqR4467TI4cbObgKLla9LGek=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 683B33858D33
Message-ID: <b4db1ea7-faaa-c7c7-d5af-42b44773e7cf@cs.umass.edu>
Date: Tue, 7 Feb 2023 15:44:29 +1100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.1
Subject: Re: [FEEDBACK] Issue with fd_set, FD_ZERO, FD_SET, FD_SETSIZE : Cygwin
To: Yeo Kai Wei <yeokaiwei AT hotmail DOT com>, gs-cygwin DOT com AT gluelogic DOT com
Cc: cygwin AT cygwin DOT com
References: <PH0PR05MB991811F96A93962E56F6DCC0A4DA9 AT PH0PR05MB9918 DOT namprd05 DOT prod DOT outlook DOT com>
<Y+FjUILtLFxXFVL5 AT xps13>
<PH0PR05MB9918AF2713B83F72042577ACA4DA9 AT PH0PR05MB9918 DOT namprd05 DOT prod DOT outlook DOT com>
<Y+FqT9AbejDHsg7h AT xps13>
<SA1PR05MB99072D6C9EAFB28AFFDD6D72A4DA9 AT SA1PR05MB9907 DOT namprd05 DOT prod DOT outlook DOT com>
<bc6f7943-ec8a-ce2d-6bf7-41dbd94dbd4c AT cs DOT umass DOT edu>
<PH0PR05MB9918A104FC0C47D903BE0808A4DB9 AT PH0PR05MB9918 DOT namprd05 DOT prod DOT outlook DOT com>
<36f2d54f-8515-42fb-e64c-86e348b8e902 AT cs DOT umass DOT edu>
<SA1PR05MB9907171D7A0D1C1507783DF2A4DB9 AT SA1PR05MB9907 DOT namprd05 DOT prod DOT outlook DOT com>
In-Reply-To: <SA1PR05MB9907171D7A0D1C1507783DF2A4DB9@SA1PR05MB9907.namprd05.prod.outlook.com>
X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, BODY_8BITS,
JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Eliot Moss via Cygwin <cygwin AT cygwin DOT com>
Reply-To: moss AT cs DOT umass DOT edu
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 3174jaUg020187

On 2/7/2023 2:56 PM, Yeo Kai Wei wrote:
> 
> On 7/2/2023 9:54 am, Eliot Moss wrote:
>> On 2/7/2023 11:34 AM, Yeo Kai Wei wrote:
>>>
>>> On 7/2/2023 7:27 am, Eliot Moss wrote:
>>>> On 2/7/2023 10:03 AM, Yeo Kai Wei via Cygwin wrote:
>>>>>
>>>>> On 7/2/2023 4:59 am, gs-cygwin DOT com AT gluelogic DOT com wrote:
>>>>>> On Tue, Feb 07, 2023 at 04:33:53AM +0800, Yeo Kai Wei wrote:
>>>>
>>>>> I updated Cygwin to 3.4.5-1.x86_64.
>>>>>
>>>>> $ uname -a
>>>>> CYGWIN_NT-10.0-19045 DESKTOP-P3E71RB 3.4.5-1.x86_64 2023-01-19 19:09 UTC x86_64 Cygwin
>>>>>
>>>>>
>>>>> However, the same problem occurs.
>>>>>
>>>>> Cygwn-devel doesn't seem to work.
>>>>>
>>>>> $ gcc -o selectStdIn selectStdIn.c
>>>>> selectStdIn.c:9:10: fatal error: sys/select.h: No such file or directory
>>>>>   #include <sys/select.h>
>>>>>            ^~~~~~~~~~~~~~
>>>>> compilation terminated.
>>>>
>>>> Well, on my system cygcheck -f /usr/include/sys/select.h clearly says
>>>> that the file came from cygwin-devel-3.4.3-1.  Maybe you misspelled
>>>> cygwin-devel ?  You do have to select the package explicitly, too.
>>>>
>>>> EM
>>>
>>>
>>> Hi Eliot,
>>>
>>> I just reinstalled Cygwin but I'm unsure of what I missed.
>>>
>>> I did "cygcheck -f /usr/include/sys/select.h" and it seems to tell me that I do have 
>>> cygwin-devel-3.4.5-1
>>>
>>> Did I miss a step?
>>
>> What gcc are you running?  Maybe not cygwin's?
>>
>> EM
> 
> Hi Eliot,
> 
> I used "cygcheck -cd" to show all the packages I have.
> 
> I can see "cygwin-devel         3.4.5-1".
> 
> 
> $ cygcheck -cd
> Cygwin Package Information
> Package              Version
> _autorebase          001091-1
> alternatives         1.3.30c-10
> base-cygwin          3.8-2
> base-files           4.3-3
> bash                 4.4.12-3
> bzip2                1.0.8-1
> ca-certificates      2022.2.54-3
> coreutils            9.0-1
> crypto-policies      20190218-1
> cygutils             1.4.17-1
> cygwin               3.4.5-1
> cygwin-devel         3.4.5-1
> dash                 0.5.12-1
> diffutils            3.9-1
> editrights           1.03-1
> file                 5.44-1
> findutils            4.9.0-1
> gawk                 5.2.1-2
> getent               2.18.90-5
> grep                 3.8-2
> groff                1.22.4-1
> gzip                 1.12-1
> hostname             3.13-1
> info                 7.0.2-1
> ipc-utils            1.0-2
> less                 590-1
> libargp              20110921-3
> libattr1             2.5.1-1.20.g0981a7bfe487
> libblkid1            2.33.1-2
> libbz2_1             1.0.8-1
> libfdisk1            2.33.1-2
> libffi6              3.2.1-2
> libgcc1              11.3.0-1
> libgdbm6             1.18.1-1
> libgmp10             6.2.1-2
> libiconv2            1.17-1
> libintl8             0.21.1-2
> liblz4_1             1.9.4-1
> liblzma5             5.4.1-1
> libmpfr6             4.2.0-1
> libncursesw10        6.3-1.20220416
> libp11-kit0          0.23.20-1
> libpcre2_8_0         10.42-1
> libpipeline1         1.5.6-1
> libpopt-common       1.18-1
> libpopt0             1.18-1
> libreadline7         8.2-2
> libsigsegv2          2.10-2
> libsmartcols1        2.33.1-2
> libssl1.1            1.1.1s-1
> libstdc++6           11.3.0-1
> libtasn1_6           4.14-1
> libuuid1             2.33.1-2
> libzstd1             1.5.2-1
> login                1.13-1
> man-db               2.11.2-1
> mintty               3.6.3-1
> ncurses              6.3-1.20220416
> openssl              1.1.1s-1
> p11-kit              0.23.20-1
> p11-kit-trust        0.23.20-1
> rebase               4.6.2-2
> run                  1.3.4-2
> sed                  4.9-1
> tar                  1.34-1
> terminfo             6.3-1.20220416
> terminfo-extra       6.3-1.20220416
> tzcode               2022g-1
> tzdata               2022g-1
> util-linux           2.33.1-2
> vim-minimal          8.2.4372-1
> which                2.20-2
> xz                   5.4.1-1
> zlib0                1.2.13-1
> zstd                 1.5.2-1
> 
> 
> Additionally, what packages do I need to download for the following?
> 
> 
> $ gcc -o basicFork basicFork.c
> basicFork.c: In function 'main':
> basicFork.c:14:9: error: 'SIGCHILD' undeclared (first use in this function); did
>   you mean 'SIGILL'?
>    signal(SIGCHILD, SIG_IGN);
>           ^~~~~~~~
>           SIGILL
> basicFork.c:14:9: note: each undeclared identifier is reported only once for eac
> h function it appears in
> basicFork.c:19:14: warning: implicit declaration of function 'fork' [-Wimplicit-
> function-declaration]
>    pid_t pid = fork();

Yes, but not gcc.  You're using some other installation of gcc.
In bash `type -all gcc` will show you the gcc's it finds, in order.
(It may find the same one multiple times because of links.)

bash is happy to invoke things in the Windows directories if
they're on your path.  For example, `type cmd` shows the
Windows cmd command line for me.

I believe the signal's name is SIGCHLD, not SIGCHILD.

Best - EM



-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019