delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/02/13/09:53:40

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ECCB9388E83A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1613228015;
bh=udrpRVb+eA2PdPvSQVpUBm96Vx8nVCM/tpyLbsof64Q=;
h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=Nh1Ob9Cw8Q+Ir45WwnWIfdlxTZjHOCZCx5D2gyqVFR2T8d8Y7WITckYP5NKar8RQ+
CYF/GtQrdMxN3tgOl5+bCn8X1dU9dLQO/gKtOK/B1R7z5cqrAoX6pIQLTjfrgYOLb+
p0v60rL4JgXcDo3cLEztp/c0WGmPGlCr8Tb/qNCY=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C02FE386F824
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to;
bh=MB5QJDQenQVLXiIf/lOCMUEj79bKSYk7MmrVBW3wGBM=;
b=Wafy25ZpEWgKecQtpvoLng5VLmfD+xIRtZMuTRQ1PRxjczuSernpvo2aShQOFHIz7H
ML04SALX24oH3vWKmnFDU8AFTvPGkE+Jn913yCZxSSoDjlzY8q2vFtZX3kXv+0uyetWA
JtXI7fMbCY6MIOGnaodYdGbj4rLuLptxyjFIZgwCnwj3h9V4dIJyJDlxJosXoFGbX7G/
TN+4W/j24QCQ33fJXMJnNw3JAuUfx2Ts/sBYLNkVmDAT27VAVukgVRxIg/Ts+0t+Bpl+
ZthuJ+vh+x9Av6bKx+JBzasGhZYGdc+2xjwKY4re2ukjvN3zTwVFF+67C8JKCLxxMDAG
miEQ==
X-Gm-Message-State: AOAM531tm+GZ21AfzKn+9ZubXf2rZphye+LLzcfPzoBlPGqnJCrmAXqE
LbK2eQcWXySsUik7KGquRon6ZifbGtMW3uZXcMqiZ5EcmfYFZQ==
X-Google-Smtp-Source: ABdhPJynqXeFlRR9pUpJKnlZSswwtonCPs/ScNsujGcRfT/iPVn+XBB6gQRLh6MkJQTB0zeNIJ0+pRYJces0JyCvkec=
X-Received: by 2002:a2e:a40e:: with SMTP id p14mr4537088ljn.390.1613228007049;
Sat, 13 Feb 2021 06:53:27 -0800 (PST)
MIME-Version: 1.0
References: <mailman DOT 14 DOT 1613217603 DOT 3576782 DOT cygwin AT cygwin DOT com>
In-Reply-To: <mailman.14.1613217603.3576782.cygwin@cygwin.com>
Date: Sat, 13 Feb 2021 20:23:15 +0530
Message-ID: <CAAWKNThOxN_uSMqua1FLbA4c=h=VU-hxtC6RGz5_4WAmhEuAew@mail.gmail.com>
Subject: Re: Cygwin Digest, Vol 12, Issue 25
To: cygwin AT cygwin DOT com
X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT,
FREEMAIL_FROM, HTML_MESSAGE, KAM_LOTSOFHASH, KAM_NUMSUBJECT, KAM_SHORT,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
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: Anuja Chanana via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Anuja Chanana <anujachanana26 AT gmail DOT com>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

Hi Marco,
Thanks for the reply.
I installed  font-util-1.3.2-1 and  xorg-x11-fonts-misc-7.5-4. Still, the
warning pops up.

Any idea why does that happen?

Anuja


> Dear Cygwin Users,
> Whenever I try to launch the Xserver on Cygwin using the command startx,
> the following error appears
>
> /usr/bin/twm: warning: font for charset ISO8859-5 is lacking.
> /usr/bin/twm: warning: font for charset KOI8-R is lacking.
> /usr/bin/twm: warning: font for charset ISO8859-7 is lacking.
> /usr/bin/twm: warning: font for charset JISX0208.1983-0 is lacking.
> /usr/bin/twm: warning: font for charset KSC5601.1987-0 is lacking.
> /usr/bin/twm: warning: font for charset GB2312.1980-0 is lacking.
> /usr/bin/twm: warning: font for charset JISX0201.1976-0 is lacking.
>
> How to solve it?
>
> Looking forward to hearing from you.
>
> Thanks,
> Anuja


$ cygcheck -p ISO8859-5 |grep font
...
font-util-1.3.2-1 - font-util: X.Org font utilities and font maps
...
xorg-x11-fonts-misc-7.5-4 - xorg-x11-fonts-misc: X11 core fonts

Regards
Marco


On Sat, Feb 13, 2021 at 5:45 PM <cygwin-request AT cygwin DOT com> wrote:

> Send Cygwin mailing list submissions to
>         cygwin AT cygwin DOT com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://cygwin.com/mailman/listinfo/cygwin
> or, via email, send a message with subject or body 'help' to
>         cygwin-request AT cygwin DOT com
>
> You can reach the person managing the list at
>         cygwin-owner AT cygwin DOT com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Cygwin digest..."
> Today's Topics:
>
>    1. Re: X server (Marco Atzeri)
>    2. Re: setrlimit always fails (Patrick Chkoreff)
>    3. Re: setrlimit always fails (Brian Inglis)
>    4. Re: setrlimit always fails (Brian Inglis)
>    5. Cygwin doesn't handle SIGWINCH properly in Windows Terminal
>       (Alvin Seville)
>
>
>
> ---------- Forwarded message ----------
> From: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
> To: cygwin AT cygwin DOT com
> Cc:
> Bcc:
> Date: Fri, 12 Feb 2021 13:12:05 +0100
> Subject: Re: X server
>
>
> On 12.02.2021 08:22, Anuja Chanana via Cygwin wrote:
> > Dear Cygwin Users,
> > Whenever I try to launch the Xserver on Cygwin using the command startx,
> > the following error appears
> >
> > /usr/bin/twm: warning: font for charset ISO8859-5 is lacking.
> > /usr/bin/twm: warning: font for charset KOI8-R is lacking.
> > /usr/bin/twm: warning: font for charset ISO8859-7 is lacking.
> > /usr/bin/twm: warning: font for charset JISX0208.1983-0 is lacking.
> > /usr/bin/twm: warning: font for charset KSC5601.1987-0 is lacking.
> > /usr/bin/twm: warning: font for charset GB2312.1980-0 is lacking.
> > /usr/bin/twm: warning: font for charset JISX0201.1976-0 is lacking.
> >
> > How to solve it?
> >
> > Looking forward to hearing from you.
> >
> > Thanks,
> > Anuja
>
>
> $ cygcheck -p ISO8859-5 |grep font
> ...
> font-util-1.3.2-1 - font-util: X.Org font utilities and font maps
> ...
> xorg-x11-fonts-misc-7.5-4 - xorg-x11-fonts-misc: X11 core fonts
>
> Regards
> Marco
>
>
>
>
>
>
> ---------- Forwarded message ----------
> From: Patrick Chkoreff <pc AT fexl DOT com>
> To: cygwin AT cygwin DOT com
> Cc:
> Bcc:
> Date: Fri, 12 Feb 2021 10:11:09 -0500
> Subject: Re: setrlimit always fails
> Ken Brown via Cygwin wrote on 2/11/21 9:06 PM:
>
> > Cygwin's setrlimit only supports a few resources, as you can see in the
> > source:
> >
> >
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/resource.cc;h=97777e9d223466b7635b990d6c9e0bfb9e2e9a46;hb=HEAD#l201
>
> Thank you to all who replied.  Shortly after I sent the email, I did
> some more searching and did find some posts to that effect, including
> one that said setrlimit was originally added as a stub to support
> porting OpenSSH.
>
> Also thank you for the pointer to the source code.
>
> The reason I'm asking about setrlimit is that I'm porting the code for
> my functional programming language "Fexl" from Linux to Windows under
> Cygwin.  (https://fexl.com)
>
> In that language I have embedded functions limit_time, limit_stack, and
> limit_memory which call setrlimit.  Those functions can be used to set
> sensible limits before running potentially dangerous code.  It's safe
> enough to allow running a program entered by a stranger in a text area
> on a web site -- even a program which deliberately tries to use an
> unbounded amount of memory.
>
> I don't know if native Windows provides enough to flesh out setrlimit
> with the equivalent behavior on Linux, even for my very limited usage
> (RLIMIT_CPU, RLIMIT_STACK, RLIMIT_AS).  Therefore the only way for me to
> do safe limits in Fexl would be to actually count evaluation steps in my
> evaluation loop, and memory usage in my allocation wrapper, and halt the
> program if it exceeds any user-imposed limits.
>
> So I would have to check evaluation steps here:
>
>
> https://github.com/chkoreff/Fexl/blob/956bdf85ff5046ebfa7fe582584fedc6881152db/src/value.c#L137
>
> And check memory usage here:
>
>
> https://github.com/chkoreff/Fexl/blob/956bdf85ff5046ebfa7fe582584fedc6881152db/src/memory.c#L28
>
> It's either that or deprecate my usage of setrlimit altogether, making
> it impossible to protect against runaway execution of potentially
> dangerous unvetted code.
>
> I will say that my first attempt at compiling the Linux code under
> Cygwin went very well.  The only compiler error was in some code that
> calls strptime.  To fix that, I had to use some macros in a sequence
> like this:
>
> #ifdef __CYGWIN__
> /* Ensure that strptime is accessible. */
> #define _XOPEN_SOURCE
> #endif
>
> #include <stdint.h>
> ...
> #ifndef __CYGWIN__
> /* Ensure that strptime is accessible. */
> #define __USE_XOPEN
> #endif
>
> #include <time.h>
>
>
> That seems to be the simplest I can make that.
>
> Thank you to all the Cygwin developers who made this porting effort
> possible!
>
>
> -- Patrick
>
>
>
>
> ---------- Forwarded message ----------
> From: Brian Inglis <Brian DOT Inglis AT systematicsw DOT ab DOT ca>
> To: cygwin AT cygwin DOT com
> Cc:
> Bcc:
> Date: Fri, 12 Feb 2021 11:56:12 -0700
> Subject: Re: setrlimit always fails
> On 2021-02-12 02:12, Corinna Vinschen via Cygwin wrote:
> > On Feb 12 00:26, Brian Inglis wrote:
> >> On 2021-02-11 19:06, Ken Brown via Cygwin wrote:
> >>> On 2/11/2021 10:23 AM, Patrick Chkoreff wrote:
> >>>> I'm trying to use setrlimit to impose limits on various resources such
> >>>> as CPU time and memory.  The call to setrlimit always fails.  I've
> >>>> distilled this into the following example test.c:
> >>> [...]
> >>>>       if (setrlimit(RLIMIT_CPU,&rlim) < 0)
> >>> [...]
> >>>> setrlimit: Invalid argument
> >>>
> >>> Cygwin's setrlimit only supports a few resources, as you can see in
> the source:
> >>>
> >>>
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/resource.cc;h=97777e9d223466b7635b990d6c9e0bfb9e2e9a46;hb=HEAD#l201
> >>
> >> In that case could I suggest:
> >>
> >>
> /usr/share/doc/cygwin-doc/html/cygwin-api/compatibility.html#std-susv4
> >>      https://cygwin.com/cygwin-api/compatibility.html#std-susv4
> >>
> >> in
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/doc/posix.xml
> >>
> >> get/setrlimit entries should be annotated with:
> >
> > https://cygwin.com/acronyms/#PGA
>
> I'll see what I can do. Does anyone know if <ulink> is supported within
> <screen>? I seem to remember struggles updating proc(5) in
> specialnames.xml.
>
> It appears that code using other than the common POSIX resources need
> existence
> checks.
> I am unsure if it is worth adding definitions for any others.
> It may be possible to implement RSS, NPROC, LOCKS, NICE, but
> https://cygwin.com/acronyms/#SHDTI
>
> Comparing Cygwin and Linux ([uapi/]asm-generic/}:
>
> #define RLIMIT_CPU              0       /* CPU time in seconds */
> #define RLIMIT_FSIZE            1       /* Maximum filesize */
> #define RLIMIT_DATA             2       /* max data size */
> #define RLIMIT_STACK            3       /* max stack size */
> #define RLIMIT_CORE             4       /* max core file size */
> #ifdef LINUX
> #define RLIMIT_RSS              5       /* max resident set size */
> #define RLIMIT_NPROC            6       /* max number of processes */
> #define RLIMIT_NOFILE           7       /* max number of open files */
> #define RLIMIT_AS               9       /* address space limit */
> #else
> #define RLIMIT_NOFILE           5       /* max number of open files */
> #define RLIMIT_OFILE            RLIMIT_NOFILE   /* BSD name */
> #define RLIMIT_AS               6       /* address space limit */
> #endif
> #ifdef LINUX
> #define RLIMIT_LOCKS            10      /* maximum file locks held */
> #define RLIMIT_SIGPENDING       11      /* max number of pending signals */
> #define RLIMIT_MSGQUEUE         12      /* maximum bytes in POSIX mqueues
> */
> #define RLIMIT_NICE             13      /* max nice prio allowed to raise
> to */
> #define RLIMIT_RTPRIO           14      /* maximum realtime priority */
> #define RLIMIT_RTTIME           15      /* timeout for RT tasks in us */
> #define RLIM_NLIMITS            16
> #else
> #define RLIMIT_NLIMITS          7       /* upper bound of RLIMIT_* defines
> */
> #endif
>
> Linux man says:
>
> "RLIMIT_MEMLOCK and RLIMIT_NPROC derive from BSD and are not specified in
> POSIX.1; they are present on the BSDs and Linux, but on few other
> implementations.
> RLIMIT_RSS derives from BSD and is not specified in POSIX.1; it is
> nevertheless
> present on most implementations.
> RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_RTPRIO,  RLIMIT_RTTIME, and
> RLIMIT_SIGPENDING are Linux-specific."
>
> --
> Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
>
> This email may be disturbing to some readers as it contains
> too much technical detail. Reader discretion is advised.
> [Data in binary units and prefixes, physical quantities in SI.]
>
>
>
>
> ---------- Forwarded message ----------
> From: Brian Inglis <Brian DOT Inglis AT systematicsw DOT ab DOT ca>
> To: cygwin AT cygwin DOT com
> Cc:
> Bcc:
> Date: Fri, 12 Feb 2021 13:38:08 -0700
> Subject: Re: setrlimit always fails
> On 2021-02-12 11:56, Brian Inglis wrote:
> > On 2021-02-12 02:12, Corinna Vinschen via Cygwin wrote:
> >> On Feb 12 00:26, Brian Inglis wrote:
> >>> On 2021-02-11 19:06, Ken Brown via Cygwin wrote:
> >>>> On 2/11/2021 10:23 AM, Patrick Chkoreff wrote:
> >>>>> I'm trying to use setrlimit to impose limits on various resources
> such
> >>>>> as CPU time and memory.  The call to setrlimit always fails.  I've
> >>>>> distilled this into the following example test.c:
> >>>>>       if (setrlimit(RLIMIT_CPU,&rlim) < 0)
> >>>>> setrlimit: Invalid argument
>
> >>>> Cygwin's setrlimit only supports a few resources, as you can see in
> the source:
> >>>>
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/cygwin/resource.cc;h=97777e9d223466b7635b990d6c9e0bfb9e2e9a46;hb=HEAD#l201
>
> >>> In that case could I suggest:
> >>>
>     /usr/share/doc/cygwin-doc/html/cygwin-api/compatibility.html#std-susv4
> >>>     https://cygwin.com/cygwin-api/compatibility.html#std-susv4
> >>> in
> https://cygwin.com/git/?p=newlib-cygwin.git;a=blob;f=winsup/doc/posix.xml
> >>> get/setrlimit entries should be annotated with:
>
> >> https://cygwin.com/acronyms/#PGA
>
> > I'll see what I can do. Does anyone know if <ulink> is supported within
> > <screen>? I seem to remember struggles updating proc(5) in
> specialnames.xml.
> > It appears that code using other than the common POSIX resources need
> existence
> > checks.
> > I am unsure if it is worth adding definitions for any others.
> > It may be possible to implement RSS, NPROC, LOCKS, NICE, but
>    https://cygwin.com/acronyms/#SHTDI
> >
> > Comparing Cygwin and Linux ([uapi/]asm-generic/}:
> >
> > #define RLIMIT_CPU            0       /* CPU time in seconds */
> > #define RLIMIT_FSIZE          1       /* Maximum filesize */
> > #define RLIMIT_DATA           2       /* max data size */
> > #define RLIMIT_STACK          3       /* max stack size */
> > #define RLIMIT_CORE           4       /* max core file size */
> > #ifdef LINUX
> > #define RLIMIT_RSS            5       /* max resident set size */
> > #define RLIMIT_NPROC          6       /* max number of processes */
> > #define RLIMIT_NOFILE         7       /* max number of open files */
>    #define RLIMIT_MEMLOCK       8       /* max locked-in-memory address
> space */
> > #define RLIMIT_AS             9       /* address space limit */
> > #else
> > #define RLIMIT_NOFILE         5       /* max number of open files */
> > #define RLIMIT_OFILE          RLIMIT_NOFILE   /* BSD name */
> > #define RLIMIT_AS             6       /* address space limit */
> > #endif
> > #ifdef LINUX
> > #define RLIMIT_LOCKS          10      /* maximum file locks held */
> > #define RLIMIT_SIGPENDING     11      /* max number of pending signals */
> > #define RLIMIT_MSGQUEUE       12      /* maximum bytes in POSIX mqueues
> */
> > #define RLIMIT_NICE           13      /* max nice prio allowed to raise
> to */
> > #define RLIMIT_RTPRIO         14      /* maximum realtime priority */
> > #define RLIMIT_RTTIME         15      /* timeout for RT tasks in us */
> > #define RLIM_NLIMITS          16
> > #else
> > #define RLIMIT_NLIMITS        7       /* upper bound of RLIMIT_* defines
> */
> > #endif
> >
> > Linux man says:
> >
> > "RLIMIT_MEMLOCK and RLIMIT_NPROC derive from BSD and are not specified
> in
> > POSIX.1; they are present on the BSDs and Linux, but on few other
> implementations.
> > RLIMIT_RSS derives from BSD and is not specified in POSIX.1; it is
> nevertheless
> > present on most implementations.
> > RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_RTPRIO,  RLIMIT_RTTIME, and
> > RLIMIT_SIGPENDING are Linux-specific."
>
> --
> Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
>
> This email may be disturbing to some readers as it contains
> too much technical detail. Reader discretion is advised.
> [Data in binary units and prefixes, physical quantities in SI.]
>
>
>
>
> ---------- Forwarded message ----------
> From: Alvin Seville <alvinseville7cf AT gmail DOT com>
> To: cygwin AT cygwin DOT com
> Cc:
> Bcc:
> Date: Sat, 13 Feb 2021 20:39:39 +1000
> Subject: Cygwin doesn't handle SIGWINCH properly in Windows Terminal
> Windows build number: Win32NT 10.0.19042.0 Microsoft Windows NT
> 10.0.19042.0
> Windows Terminal version (if applicable): 1.5.10271.0
>
> Script to reproduce this issue:
>
> #!/usr/bin/env bashfunction outputText()
> {
>   local text=$1
>   local -i textLength=${#text}
>
>   local -i line="$(tput lines) / 2"
>   local -i col="$(tput cols) / 2 - $textLength / 2"
>
>   clear
>   echo -en "\e[$line;${col}H$text"
> }
> trap "outputText 'Hello world!'" SIGWINCH
>
> outputText 'Hello world!'while truedo
>     :done
>
> As you see Windows Terminal doesn't handle SIGWINCH
> <https://man7.org/linux/man-pages/man7/signal.7.html> properly. However
> everything works fine when I execute my script directly from Cygwin
> Terminal without Windows Terminal which users told
> <https://github.com/microsoft/terminal/issues/9113#issuecomment-777703560>
> me that it seems to be a Cygwin bug.
> --
> alvinseville7cf AT Alvins-MacBook-Pro ~ $* echo *"Best regards, Alvin
> Seville."*
> && exit*
>
> --
> 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
>
--
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