public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* xargs completely broken under cygwin 3.6.0-0.108.gb7f5a33200a9
@ 2024-04-02  3:36 Bruce Jerrick
  2024-04-02  6:18 ` Brian Inglis
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Bruce Jerrick @ 2024-04-02  3:36 UTC (permalink / raw)
  To: cygwin

'xargs' (part of 'findutils') is completely broken if
  3.6.0-0.108.gb7f5a33200a9 (test version) is installed:

  $ xargs
  xargs: Unexpected suffix cmdline on cmdline

  $ xargs --version
  xargs: Unexpected suffix cmdline on cmdline

  $ echo narf | xargs echo
  xargs: Unexpected suffix cmdline on cmdline

'xargs' is from the current x86_64 findutils-4.9.0-1 .
All other packages are up to date per setup.ini dated
  2024-04-01 21:32:37 GMT.

I first discovered this under Windoze 11 Insider Preview
  (with no other Cygwin test versions).
On a Windoze 10 machine, it was OK with cygwin 3.5.1-1,
  appeared when I installed 3.6.0-0.108.gb7f5a33200a9,
  then went away when I reverted to 3.5.1-1 .
(All machines are VMware VM's.)

----------------------------------------------------------------

I have just started looking at the source, and the error
  is coming from this snippet from 'safe_atoi()' in
  lib/safe-atoi.c :

safe_atoi (const char *s, enum quoting_style style)
{
  ...
  lval = strtol (s, &end, 10);
  ...
  else if (*end)
    {
      die (EXIT_FAILURE, errno, _("Unexpected suffix %s on %s"),
       quotearg_n_style (0, style, end),
       quotearg_n_style (1, style, s));
    }
  ...

From 'man 3 strtol":
  "If the subject string is empty (or not in acceptable form),
    no conversion is performed and the value of s is stored
    in ptr [i.e., 'end'] ..."
Which is apparently what is happening here.

I have yet to discover where "cmdline" is coming from (perhaps
  /proc/%d/cmdline), let alone what it looks like.
Further progress by me will depend on what success I have in
  building 'findutils' from source :) .


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-02 18:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02  3:36 xargs completely broken under cygwin 3.6.0-0.108.gb7f5a33200a9 Bruce Jerrick
2024-04-02  6:18 ` Brian Inglis
2024-04-02  7:48 ` Bruce Jerrick
2024-04-02  8:08   ` Bruce Jerrick
2024-04-02  8:42 ` Bruce Jerrick
2024-04-02 10:44   ` Corinna Vinschen
2024-04-02 13:13     ` Corinna Vinschen
2024-04-02 15:38 ` Bruce Jerrick
2024-04-02 18:33   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).